我的htacess文件中有这个:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(staging.)?example.com$
RewriteCond %{REQUEST_URI} !^/staging/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /staging/$1
RewriteCond %{HTTP_HOST} ^(staging.)?example.com$
RewriteRule ^(/)?$ staging/index.php [L]
如何强制所有https请求到http?
答案 0 :(得分:0)
类似的东西:
RewriteCond %{HTTPS} /on/
RewriteRule ^(.*)$ http://hostname/$1 [L,R]
规则必须是重定向才能从HTTPS切换到HTTP。