I have a site which uses htaccess in order to use nice URLs. However I want the htaccess file to leave alone a whole folder and it's content completely. The content of my htaccess file is:
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1
How should I complete the above code to EXCLUDE completely the folder named "admin"
Many thanks in advance!
RewriteBase is a useful server directive available for Apache web server that allows you to easily update numerous rewrite rules at one go.
You could also put a new .htaccess file in the folder you want to ignore, saying:
RewriteEngine Off
Where the folder you want excluded is /excluded-folder/
you would add the following rule:
RewriteCond %{REQUEST_URI} !^/excluded-folder/.*$
before the other two RewriteConds you have listed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With