Set HTTP condition for redirect rule

Posted by Török Gábor on Server Fault See other posts from Server Fault or by Török Gábor
Published on 2010-01-20T10:46:23Z Indexed on 2010/03/11 19:19 UTC
Read the original article Hit count: 331

Filed under:
|
|

A have a redirect rule in my .htaccess that forwards agent from A.html to B.html using the following pattern:

Redirect 301 /A.html http://mysite.com/B.html

Since the Redirect directive requires to set the target host, is it possible to let this rule prevail only on a specific host? I have both a test and deploy domain, and only want it on the deploy domain. I can set HTTP conditions for Rewrite rules, but how can I for HTTP Redirects?

© Server Fault or respective owner

Related posts about .htaccess

Related posts about redirect