2012-06-16 108 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]