使用的.htaccess到域重定向到另一个网址 [英] Using .htaccess to redirect a domain to another URL
问题描述
我已经运行Word,preSS一个网站,它是完整的网站。其中一个网页就像一个接触形成我们位于www.ourdomain.com/contact-us /
I have a site running wordpress, it's the full site. One of the pages is like a contact-us form located at www.ourdomain.com/contact-us/
我也有喜欢contactourdomain.com一个网址,我希望它重定向到www.ourdomain.com/contact-us /
I also have a URL like contactourdomain.com and I want it to redirect to www.ourdomain.com/contact-us/
我们用来与网络解决方案的重定向做到这一点,但我preFER就什么都有了正确的服务器,如果可能在做。我有几分它的工作,但是当你访问的链接仍然说contactourdomain.com/contact-us/作为URL,并打破所有其他的人。
We used to do this with a redirect on network solutions, but I prefer to have it all done right on the server if possible. I've got it sort of working but when you visit the link is still says contactourdomain.com/contact-us/ as the URL, and that breaks all the other ones.
有什么建议?
推荐答案
如果您在.htaccess中添加,这是它的工作:
if you add this in .htaccess is it working?:
RewriteRule ^$ contact-us/ [R=301,L]
请给我..
keep me posted..
这篇关于使用的.htaccess到域重定向到另一个网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!