2013-02-28 110 views
0

在我的地盤我想http://domain_name.com/blog重定向到http://domain_name.com/news,它應該用以下標準也htaccess的301重定向不工作

  1. http://domain_name.com/blog/2012/06/06//blog_title是工作http://domain_name.com/news

  2. http://domain_name.com/blog/blog/?cat=2http://domain_name.com/news

我該怎麼做?

+0

任何2012/06/06來需要重定向消息。 這裏的博客只修復其他在該網址將是動態的,所以不管博客後我需要重定向http://domain_name.com/news – somasundaram 2013-02-28 11:03:08

回答

0

不能測試,但無論如何...

RewriteEngine on 
RewriteRule/
RewriteRule ^/blog/.*$ /news/ [L,R=301] 
+0

我不想將博客更換爲新聞,博客這個詞在哪裏來了它會重定向到http://domain_name.com/news 如: http://domain_name.com/blog/2012/06/06//blog_title到http://domain_name.com/news 不 http://domain_name.com/news/2012/06/06//blog_title – somasundaram 2013-02-28 09:51:47

+0

確實,這正是它所做的。 – n1xx1 2013-02-28 10:25:36

+0

我試過了,但它不起作用。 – somasundaram 2013-02-28 11:21:30