域名重定向到新的使用htaccess的领域到新、重定向、领域、域名

2023-09-02 10:08:05 作者:老板、

我已经看了一圈又一圈,但没有找到任何工作具体到我的需要。

I've looked around and around and couldn't find anything that worked specific to my needs.

我需要弄清楚如何大规模重定向所有的URL与旧域到新的领域。例如:

I need to figure out how to mass redirect all URLs with the old domain to the new domain. For example:

http://www.olddomain.com/blog-post-title 至 http://www.newdomain.com/blog-post-title

的URI始终是相同的,我只需要htaccess的认识到,当一个URL有这一点,并重定向到新的领域。

The URI is always the same I just need the htaccess to recognize when a URL has this and redirect it to the new domain.

任何想法?

感谢您!

推荐答案

如果你想你的旧域名的批发重定向到新的一个,你可以使用的 重定向 指令

If you want to redirect your old domain wholesale to the new one, you can just use the Redirect directive

Redirect / http://www.newdomain.com/
 
精彩推荐