1

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]
Community
  • 1
  • 1
roy naufal
  • 369
  • 1
  • 7
  • 18

2 Answers2

1

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

Vrac
  • 984
  • 1
  • 6
  • 15
0

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

RewriteCond %{REQUEST_URI} !^/admin.*
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
Amit Verma
  • 39,545
  • 18
  • 87
  • 107