我想将所有网站URL(带有www(从https重定向到http
现在,使用下面的代码,它仅通过https://www.example.it工作到http://www.example.it(以及所有其他页面(例如:example.com/page02.php)php)
但从https://example.com到http://example.com(err_connection_refuse(
不起作用这是我拥有的代码:
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^example.com [OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
有人知道我该怎么做吗?
尝试以下:
RewriteCond %{SERVER_PORT} ^443
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
在RewriteEngine On
之后放置规则,然后清除浏览器缓存,然后测试