1
我有文件夾主頁/管理員。在這個文件夾中有index.php。 當我訪問domain.com/admin/時,我的mod_rewrite規則將其重定向到我的index.php文件夾中。我想mod_rewrite跳過現有的一個或多個文件,特殊情況下爲/ admin /文件夾,其中包含index.php文件。幫助與mod_rewrite
我重寫規則是:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
感謝。
它不會跳過,如果我鍵入主機/管理員。我需要它跳過,因爲我在文件夾中有index.php。 – taras 2009-05-26 13:55:05