我一直在努力尝试,并找不到解决方案,这肯定很容易。我有规则mod_rewrite - 除静态文件夹以外的所有索引
RewriteEngine on
RewriteRule (.*) index.php [L]
所以它重定向所有URL的index.php,现在我希望所有的文件预计这种静态文件夹重定向,所以像domain.com/static网址/ ...不会被重定向。我试过,例如:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^static$
RewriteRule (.*) index.php [L]
或
RewriteEngine on
RewriteRule static/(.*) static/$1 [L]
RewriteRule (.*) index.php [L]
和其他一些变化,但似乎没有任何工作...
你最后的规则集对我来说看起来是否正确,你是否尝试[R,L]而不是[L]? –
[R,L]不起作用... – f1ames