Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

Thanks!

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

1 Answer

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
add comment

Your Answer

 
discard

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.