我一直在努力嘗試,並找不到解決方案,這肯定很容易。我有規則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