I need to redirect everything on one site to a new domain, except one path.
So domain.com/anything needs to go to newdomain.com/anything.
But I don't want domain.com/services/xml to redirect.
I've tried lots of conditions, but nothing works. It always ends up redirecting it, or redirecting it to some other weird path on the new domain.
This does not work:
RewriteCond %{REQUEST_URI} !^/services/xml$
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]
Any help is appreciated. Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…