We help IT Professionals succeed at work.

Stopping mod_rewrite on certain directories?

NickMaton12757
on
Medium Priority
173 Views
Last Modified: 2010-03-04
I have a mod_rewrite script that changes query string URLs into directories. The problem is I just added a real directory, and mod_rewrite confuses it with a query string URL. Is there a way to say if the url is requesting /thisdirectory/ or anything in /thisdirectory/ to just go to that directory?
Comment
Watch Question

Top Expert 2008

Commented:
RewriteRule ^directory  - [L]

above your RewriteRules to skip them.

Author

Commented:
That makes www.MyDomain.com/directory/ work, but it still doesn't like www.MyDomain.com/directory/admin
Top Expert 2008
Commented:
The regEx uis open to rthe right side, so it should catch every filepath starting with directory. Do you have othr .htaccess files in place? Check the RewriteLog.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.