【发布时间】:2013-12-14 03:55:20
【问题描述】:
我需要在 nginx 中创建重写,就像在我的 .htaccess 中所做的那样,有些行我不完全理解。
DirectoryIndex index.php
RewriteEngine on
RewriteCond % !-f
RewriteRule ^(.*)/$ ?path=$1 [QSA,L]
谁能给我解释一下?
【问题讨论】:
-
这是不正确的:
RewriteCond % !-f -
我怀疑这是不正确的,但它可以工作并且可以工作很长时间。我刚刚开始了解当前的配置并进行更正。
标签: regex .htaccess mod-rewrite nginx rewrite