2013-03-15 137 views
0

我想告訴我的Apache,我想要一個重定向永久性規則。RedirectMatch不工作

我有論文2種命中在我的日誌:

xx.xxx.xx.x - - [15/Mar/2013:08:14:21 +0100] "POST /oldEndPoint/services/toto HTTP/1.1" 200 - 6003 - 
xx.xxx.xx.x - - [15/Mar/2013:08:15:40 +0100] "POST /newEndPoint/services/Tutu/toto HTTP/1.1" 200 - 1316 - 

我想告訴給了Apache,當他收到命中/ oldEndPoint /服務/ TOTO那麼他應該做永久重定向(301)到新的url:/ newEndPoint/services/Tutu/toto。

我試圖與這條規則,但它不工作,沒有出現重定向:

RedirectMatch 301 /modBackend/moderation/facebook /modFront/services/Moderation/facebook 

謝謝!

+0

'/ modBackend/moderation/facebook'!='/ oldEndPoint/services/toto'。或者我錯過了什麼? – cheesemacfly 2013-03-15 16:10:23

回答

0

對於簡單重定向,您不需要RedirectMatch

改爲只看到Redirect。您必須先輸入舊網址,然後輸入新網址

Redirect /oldEndPoint/services/toto /newEndPoint/services/Tutu/toto