域名重定向到新的使用htaccess的领域 [英] Redirect domain to new domain using htaccess

查看:88
本文介绍了域名重定向到新的使用htaccess的领域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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/

这篇关于域名重定向到新的使用htaccess的领域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆