thinkphp .htacess 设置重定向到HTTPS
编辑器打开.htaccess文件,写入如下规则:<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R]
RewriteCond %{REQUEST_FILENAME} !- [...]