Apache下设置自动将http跳转到https方法
Options FollowSymLinks
AllowOverride All #这里原先是None要改为All
Order allow,deny
Allow from all
首先在网站根目录下创建.htaccess文件,如果目录下已经有.htaccess文件,则用vi或者其他编辑器打开,在最下面添加写入如下语句即可
RewriteEngine on
RewriteBase /
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI}
页:
[1]