Htaccess url rewrite if file doesn't exist * OR * specific directory

I have an htaccess rewrite rule that overwrites if the requested file does not exist, but I would also like this rule to ignore this rule if the request ends up in a specific directory. I'm not sure how to do this, however.

My current rewrite rule is:

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/$1 [L]

      

How could you change to ignore a specific directory?

+3


source to share


1 answer


RewriteBase /
RewriteCond %{REQUEST_URI} !^/foldername
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/$1 [L]

      



Gotta do the trick

+5


source







All Articles