简体   繁体   English

301和HTTPS通过htaccess重定向到root

[英]301 and HTTPS redirect to root via htaccess

I moved domain from http to https . 我将域从http移到了https And currently all http urls are redirected to https . 目前所有的http网址都重定向到https But there are some broken links from old urls such as http://domain.tld/url-link-broken and I would like to redirect them to the root domain. 但是旧网址有一些断开的链接,例如http://domain.tld/url-link-broken ,我想将它们重定向到根域。 The problem is that currently http://domain.tld/url-link-broken redirects to https://domain.tld/url-link-broken How can I change this via htaccess so that if url is broken it would not only redirect to https but also to the root? 问题是当前http://domain.tld/url-link-broken重定向到https://domain.tld/url-link-broken我如何通过htaccess更改它,以便如果url被破坏,它不仅会重定向到https但也重定向到根?

Check following things first 首先检查以下内容

  • Your console gives any error there regarding resources 您的控制台在此处显示有关资源的任何错误
  • Check do you have static links in menu or anywhere else 检查菜单或其他任何地方是否有静态链接
  • Check your home_url and site_url in admin 在管理员中检查您的home_url和site_url

Solution

For More Information : 欲获得更多信息 :

https://managewp.com/wordpress-ssl-settings-and-how-to-resolve-mixed-content-warnings https://managewp.com/wordpress-ssl-settings-and-how-to-resolve-mixed-content-warnings

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

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