Mobile app version of vmapp.org
Login or Join
Ravi8258870

: Redirect all urls to a subfolder 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/

@Ravi8258870

Posted in: #Apache #ModRewrite

I have several old, broken urls that looked like this: www.easyjob.net/partners/whatever.html
I would like to redirect them all to 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!

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Ravi8258870

1 Comments

Sorted by latest first Latest Oldest Best

 

@Lee4591628

Try something like this:

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


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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme