Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several old, broken urls that looked like this: http://www.easyjob.net/partners/whatever.html

I would like to redirect them all to http://www.easyjob.net/partners/general/

The following rule won't work, as the "destination" url will trigger the same rule again, and I'll get a "too many redirects" error.

How can I match any html file inside the /partners/ folder but without matching anything in the /partners/general/ subfolder?


share|improve this question
You forgot to include your current rule. Did you use the L flag ? – pritaeas Aug 24 '11 at 8:30
up vote 1 down vote accepted

Try something like this:

RewriteCond %{REQUEST_URI} !partners/general/(.*)?
RewriteRule partners/(.*) http://www.easyjob.net/partners/general/ [R=301]

You may need to tweak the RewriteCond to meet the exact exclusion you're looking for.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.