从HTTPS重定向到HTTP


Redirect from HTTPS to HTTP

我的网站页面www.itcontractorsuk.com/contractor_mortgages.php已在谷歌索引中的https版本中进行了索引,即。https://www.itcontractorsuk.com/contractor_mortgages.php

然而,我已经从我的网站上卸载了SSL,但谷歌仍然在其索引中保留了该页面的https版本。因此,当有人点击https版本时,它会给出107 SSL错误。

有没有一种方法可以在.htaccess文件中写入一些内容,将https请求重定向到http,即。http://www.itcontractorsuk.com/contractor_mortgages.php

您应该使用R=301来通知搜索引擎更新其链接。将此代码放入DOCUMENT_ROOT/.htaccess文件:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,NE,L]