DM_5174
May 09, 2011Nimbostratus
HTTP to HTTPS conditional redirect help
hi all,
Please help with integrating the first code and second code int an effcient script that achieve both redirecting if the
users comes in connecting to www.test.com so it goes to another URL that is HTTPS, and also if I come in
on this virtual server other than www.test.com should get the normal http-to-https default redirect.
Thanks for your help!
when HTTP_REQUEST {
Check if requested domain is www.test.com
if {[string tolower [HTTP::host]] eq www.test.com}{
Redirect client to https
HTTP::redirect ]
}
}
**** We need also need to add the default for any request to this Virtual server so it can redirect to all connections from HTTP to HTTPS
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}