简体   繁体   English

301重新导向至wordpress根目录

[英]301 redirect to wordpress root

I have an old site that I am updating to a wordpress site. 我有一个旧网站,我正在更新到一个wordpress网站。 I created 301 redirects, all of which seem to be working perfectly except those that are redirecting to the homepage. 我创建了301个重定向,除了那些重定向到首页的重定向以外,其他所有重定向似乎都正常运行。 I get an error stating that there are too many redirects. 我收到一条错误消息,指出重定向太多。 I've tried multiple iterations and can't seem to get it working. 我尝试了多次迭代,但似乎无法正常工作。

Redirect 301 /about-us.shtml /
Redirect 301 /about-us.shtml /home/
Redirect 301 /about-us.shtml http://example.com/

Can someone tell me the proper way to do this? 有人可以告诉我正确的方法吗? thanks! 谢谢!

That 3rd one looks right, just make sure you put the exact url of your actual website. 第3个看起来正确,只需确保您输入了实际网站的确切网址即可。 Access the site, then just copy and paste the domain name without any subdirectories. 访问该站点,然后仅复制并粘贴没有任何子目录的域名。 If you have a trailing slash, it may not work. 如果有斜杠,则可能不起作用。

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

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