Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod rewrite all but not /admin/

Status
Not open for further replies.

JamesGMills

Programmer
Aug 15, 2005
157
GB
Hi All,

I have this to redirect all requests to index.php which then handles all the other stuff... but I want this to work for everything except /admin/

Can anyone help please...

RewriteEngine on
RewriteRule !\.(gif|jpg|png|css)$ index.php

------------------------
 
Just exclude /admin as a condtion:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/admin/
RewriteRule !\.(gif|jpg|png|css)$ index.php

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top