简体   繁体   English

通过.htaccess的HTTPS到HTTP重定向

[英]HTTPS to HTTP redirect via .htaccess

I have a website hosted on a GoDaddy wordpress hosting. 我有一个在GoDaddy wordpress托管上托管的网站。 We had an SSL, but not longer have the SSL. 我们有一个SSL,但不再有SSL。 Google archive some pages with the SSL so I just want to redirect https requests to the http version of the sit.e I have access to the .htaccess file so I figured that was the best way to do it. Google使用SSL归档了一些页面,所以我只想将https请求重定向到sit.e的http版本。我可以访问.htaccess文件,所以我认为这是最好的方法。

I have been searching around and tried tons of different .htaccess redirects, but none of them are working. 我一直在搜索,并尝试了大量不同的.htaccess重定向,但是它们都没有起作用。 Including this https to http 301 redirect via htaccess . 通过htaccess将这个https包含到http 301重定向中 I know the htaccess is functioning because wordpress is working and I added a few test redirects to it and they worked as well. 我知道htaccess可以正常工作,因为wordpress可以正常工作,我向它添加了一些测试重定向,它们也正常工作。

Any thoughts or suggestions would be much appreciated. 任何想法或建议将不胜感激。

Thanks. 谢谢。

Wordpress has its own redirect procedure. WordPress有其自己的重定向过程。

Check in the General Settings of you WP Panel for the WordPress Address and the Site Address fields. 在WP面板的“常规设置”中检查WordPress地址和“站点地址”字段。 Make sure they both are non ssl absolute paths. 确保它们都是非SSL绝对路径。

Another thing to check is on the wp-config.php 另一件事要检查的是wp-config.php

define('FORCE_SSL_ADMIN', true);

That could have been added by another plugin. 那可能是由另一个插件添加的。 Remove it or make it false. 删除它或使其为假。

One last thing you could try (not the best option) is to ask google to remove those specific links, here's a reference for that. 您可以尝试的最后一件事(不是最好的选择)是要求Google删除那些特定的链接, 这是对此的参考

I hope this helps. 我希望这有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM