如何删除https



在我的网站上,只有少数页面使用https。我不知道它是从哪里来的,但我必须删除那些https。我该如何实现。

我当前的.htaccess设置

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /indiv/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /indiv/index.php [L]
 RewriteCond %{HTTPS} on
RewriteRule ^/?$ http://%{SERVER_NAME}/indiv/ [R=301]
RewriteRule ^indiv/?$ http://%{SERVER_NAME}/indiv/ [R=301,L]
</IfModule>

用以下代码替换所有代码:

RewriteEngine On
RewriteBase /indiv/
RewriteCond %{HTTPS} on
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
RewriteRule ^index.php$ - [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

最新更新