Brian_Kenworthy
Feb 10, 2011Nimbostratus
HTTP>HTTPS Redirect to different domain
Hi all, this should be pretty simple....hopefully.
I have a simple HTTP>HTTPS redirect in place for a domain --> HTTP::redirect "https://[HTTP::host][HTTP::uri]"
We have several subdomains (~15) xxx.domainA.com, yyy.domainA.com, etc. What we would like to do now is redirect those same sub domains to a new domain:
http://xxx.domainA.com to https://xxx.domainB.com
http://yyy.domainA.com to https://yyy.domainB.com
http://zzz.domainA.com to https://zzz.domainB.com
Is there any easier way to do this besides using a switch command for ever sub domain? I.E.
when HTTP_REQUEST {
switch [HTTP::host] {
xxx.domainA.com {
HTTP::redirect "https://xxx.domainB.com"
}
yyy.domainA.com {
HTTP::redirect "https://yyy.domainB.com"
}
etc...
Thanks in advance for the help!