Search
 
SCRIPT & CODE EXAMPLE
 

PHP

force https with php

if($_SERVER["HTTPS"] != "on")
{
    header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
    exit();
}
Comment

PREVIOUS NEXT
Code Example
Php :: mac use php@7.4 
Php :: laravel make directory if not exists 
Php :: clear log file laravel command 
Php :: if any comma in string in php 
Php :: laravel custom model primary Key 
Php :: laravel get random number of data from database 
Php :: laravel 7 error npm run dev 
Php :: Hours to minute convert in php 
Php :: php string cut first x characters 
Php :: laravel storage check file exists 
Php :: query sort alphabetically wp 
Php :: hide .php from url .htaccess 
Php :: wordpress get archive title 
Php :: wordpress if is in category 
Php :: make a forign key in migrations using laravel 8 
Php :: laravel optimize clear 
Php :: write if and else in one line php 
Php :: Add [nom] to fillable property to allow mass assignment 
Php :: php delete array item by value not key 
Php :: wp config define site url code 
Php :: get client size in laravel 
Php :: woocommerce redirect shop page 
Php :: create laravel project old version 
Php :: php get ip address 
Php :: php yesterday date 
Php :: php copy image from one folder to another 
Php :: php get location of user 
Php :: carbon parse sunday 30 days ago 
Php :: php get start and end date of month and year 
Php :: php get first and last day of previous month 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =