views:

43

answers:

1

I am using mod_rewrite to put a category name in the URL, like locahost/categoryName and also a location localhost/categoryName/locationName .

One question I had, and I'm sure it's easy to do as a rewrite rule, is how can I make it so that the rule does not apply to some specific directory, like: localhost/admin . In that case I want it to go to the actual physical directory.

Thanks

+2  A: 

Make this your first rule:

RewriteRule localhost/admin - [L]

That means: match localhost/admin, do nothing, last rule (only if matched).

chaos
will it match /admin/something? /admin? /admin/ ? etc ...?
nute
Yeah. It will match `/administrator`, for that matter. Put a slash on the end to only match `/admin` and things under it.
chaos