解释htaccess重写条件

时间:2014-08-29 13:41:34

标签: apache .htaccess mod-rewrite rewrite

在当前项目中,我有以下重写选项。在生产服务器上,everythnig工作正常,但在本地总是得到404.我认为,这个问题可能在这个重写条件下。有人可以解释这是如何工作的吗?

RewriteCond ${rewrite:%{REQUEST_URI}|notfound} !=notfound
RewriteRule (.*) ${rewrite:%{REQUEST_URI}} [R=301,L,QSA]

然后......

RewriteCond %{REQUEST_URI} ^/([^\/|\.]+)/([^\/|\.]+/)*([^\/|\.]+)/?$
RewriteCond ${multishop:%1|notfound} !=notfound
RewriteCond ${kategorie:%3|notfound} !=notfound
RewriteRule (.*) index.php?${multishop:%1}&cat=${kategorie:%3} [L,QSA]

Apache配置会影响这个吗?

1 个答案:

答案 0 :(得分:1)

这种条件语法表明,很可能您在生产服务器的Apache配置中RewriteMap定义了