Root directory like this:
/index.php
/App
/Extend
/PHPrpc
...
I want exclude sub directory /Extend
and /Phprpc
from the rules.
The old .htaccess file like this:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
开发者_运维技巧
The following is modified by me:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(Extend|PHPrpc) - [L] #exclude directory
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
But I get 500 Internal Server Error.
Any advise?
If you want to exclude the URLs, simply filter it using RewriteCond:
RewriteCond %{REQUEST_URI} !^/(Extend|Phprpc)/
精彩评论