htaccess的重定向一个特定的页面来根 [英] .htaccess to redirect a specific page to root
本文介绍了htaccess的重定向一个特定的页面来根的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有对SO几个变种的问题上,但我没有找到一个回答我的特定问题。
我想补充重写规则,以我的htaccess的,将采取所有流量将
http://example.com/blog/its-a-sunny-day
和重定向到
http://example.com
在理想情况下,这应该通过302来完成,因为这将在以后进行修改。
解决方案
重定向/博客/其-A-阳光明媚的一天http://example.com
这似乎工作。
There are several variant questions on this on SO, but I did not find one that answers my specific problem.
I want to add a rewrite rule to my htaccess that will take all traffic going to
http://example.com/blog/its-a-sunny-day
and redirect to
http://example.com
Ideally this should be done via 302, as it will be changed later.
解决方案
Redirect /blog/its-a-sunny-day http://example.com
This seems to work.
这篇关于htaccess的重定向一个特定的页面来根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文