I will first determine whether you have enabled https. If it is a normal https page, if it is not started, it will jump to the project directory. If you are interested, please refer, hope to help you
I will first determine whether you have enabled https. If it is a normal https page, if it is not started, it will jump to the project directory. If you are interested, please refer, hope to help you
The code is simple and involves the use of the header function. The Code is as follows:
The Code is as follows:
If (! Empty ($ _ SERVER ['https']) & ('on' ==$ _ SERVER ['https']) {
$ Uri = 'https ://';
} Else {
$ Uri = 'HTTP ://';
}
$ Uri. = $ _ SERVER ['HTTP _ host'];
Header ('location: '. $ uri.'/demo /');
Exit;
?>
Code explanation: I will first determine whether you have enabled https. If it is a normal https page, if it is not started, it will jump to the project directory.