——Rex's Blog,Westlife歌迷,Linuxer
有些时候为了安全,可能需要使用HTTPS访问,那么PHP文件中加上以下代码
if($_SERVER['HTTPS']!="on") { $redirect= "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; header("Location:$redirect"); }
BTW:用HTTPS需要独立IP和SSL证书。恩,你懂的 ^_^
转载请注明:Living Beyond The Clouds 仿若云端 [http://blog.rex.la]
本文链接地址:http://blog.rex.la/909.html
alipay
Dreamhost
Http Error
Linux
Nginx
Opera
Our Story
PHP
The Love Album
WHMCS
WinRAR
Wordpress
三坊七巷
天使
如果云知道
思念
搬家
教程
杂文
漏洞
笔记
自定义PHP.INI
花开的诺言
随想
青春 C (9)
Nginx (4)
Our Story (27)
The Love Album (13)
教程 (19)
杂文 (7)
随想 (24)
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
来顶一下,呵呵不错,学习了,周末马上到了祝周末愉快!
PHP程序我不懂但是我必须要学习的