Forum Moderators: phranque

Message Too Old, No Replies

Apache Redirect based on condition

         

wzmyis

1:54 pm on Apr 13, 2009 (gmt 0)

10+ Year Member



Is it possible to do this:

Redirect permanent /old-file-name.html [your-domain.com...]

But only for a specific domain?

redhatlab

4:39 pm on Apr 13, 2009 (gmt 0)

10+ Year Member



Hi wzmyis,

Have you try this:

redirect /old-file-name.html [your-domain.com...]

g1smd

4:51 pm on Apr 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What do you mean by "only for a specific domain"? Do you have multiple domains pointing at a server?

You would need a RewriteRule with [R=301,L] to do that, along with a preceding RewriteCond that tests the HTTP_HOST information.