【发布时间】:2019-03-10 15:48:22
【问题描述】:
我想删除强制 https,并将 https:// 重定向到 http://
我的webroot文件夹中的.htaccess如下:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
我试过了
<IfModule mod_rewrite.c>
#Redirect HTTPS to HTTP
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
但它没有被重定向。
提前致谢
【问题讨论】:
标签: php apache .htaccess mod-rewrite cakephp