1
votes

I have the following in my .htaccess, it rewrites all to a central file, I want to bypass it for a certain folder (& all its subfolders), the folder I want to bypass is named "admin" , how should I modify this rewrite to stop rewriting for admin folder?

I checked this question but wasn't able to get the needed results:

.htaccess mod_rewrite - how to exclude directory from rewrite rule

RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
2

2 Answers

1
votes

Perhaps the easiest way is to put an .htaccess in the admin folder with nothing but: RewriteEngine Off.

0
votes

To exclude the admin folder from Your rule ,you can use :

RewriteCond %{REQUEST_URI} !^/admin.*
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]