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
  • 379
  • 1
  • 8
  • 19

2 Answers2

1

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

Vrac
  • 1,054
  • 1
  • 8
  • 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
  • 40,709
  • 21
  • 93
  • 115