Reputation: 109
I have a .htaccess that redirects everything to it's lower-case equivalent. For example:
example.com/HellO/WorLd -> example.com/hello/world
Here is my .htaccess:
RewriteEngine on
RewriteBase /
RewriteMap lowercase int:tolower
RewriteCond $1 [A-Z]
RewriteRule ^/?(.*)$ /${lowercase:$1} [R=301,L]
Is it possible to overwrite this beheviour in the subfolder /admin? So that example.com/admin/WorLd would not change?
Thank you in advance.
Upvotes: 1
Views: 42
Reputation: 41219
You can use RewriteCond
to exclude the /admin
folder from your RewriteRule.
Put the following condition right above your RewriteRule
line :
RewriteCond %{REQUEST_URI} !^/admin [NC]
Upvotes: 2