3

I have an htaccess rewrite rule that rewrites if the file requested doesn't exist, but I would also like this rule to ignore this rule if the request falls within a specific directory. I am unsure how to do this however.

My current rewrite rule is this:

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

How would you modify to ignore a specific directory?

1 Answer 1

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

Should do the trick

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.