Excluding a specific folder from .htaccess rewrites

Here’s a useful .htaccess snippet if you need to exclude a folder from your .htaccess rewrite.


RewriteEngine On
RewriteCond %{REQUEST_URI} !^/exclude-folder/.*$
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d

RewriteRule ^(.*)$ index.php/$1

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *