2012-06-16 91 views
0

由於某種原因,這是行不通的,我錯過了一些明顯的東西?.htaccess簡單重寫不起作用

RewriteRule ^(.*)infopopup.html$ /acatalog/infopopup.html 
+0

您是否嘗試檢查'rewrite'模塊是否啓用?另外,你可能想要在'.html'中跳過那個點。 – Alexander

+0

是的,因爲我有一些其他的重寫,所以啓用了重寫。當輸入這一行時,我得到一個互聯網服務器錯誤,有和沒有逃脫點... – Paul

+0

你需要把更多的信息 - 有你知道的日誌;) – Alexander

回答

1

我猜你需要排除從重寫規則的目標文件,因爲這可能會導致重寫一個無限循環:

RewriteRule ^acatalog/infopopup.html - [L] 
RewriteRule ^(.*)infopopup.html$ acatalog/infopopup.html [L] 
0

它是一個循環的問題,這裏就是結束了工作:

RewriteBase/
RewriteCond %{REQUEST_URI} !/acatalog/.* 
RewriteRule ^(.*)infopopup.html$ acatalog/infopopup.html [QSA,L]