|
|
https (ssl) redirect code in php - PHP
|
Views : 283
|
|
Tagged in : PHP
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
here is the code to be used in your page to redirect all http pages to https (secure connection - ssl)
<?
if($_SERVER['HTTPS']!="on")
{
$redirect= "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
header("Location:$redirect");
}
echo "testing https (ssl) redirection using php";
?>
|
|
By - rajesh, On - 2010-01-01 |
|
|
|