Forum Discussion
VernonWells
Mar 18, 2016Employee
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] ne "www.mysite.com" && [HTTP::path] ne "/myuri" } {
HTTP::redirect "https://www.mysite.com/myuri"
}
}
If you have two Virtual Servers -- one for HTTP traffic and one for HTTPS traffic (with TLS offloading) -- and you only want to redirect things going to the first Virtual Server (and thus, only traffic going to http:// and specifically, not traffic going to then you could simply do this on the HTTP Virtual Server:
when HTTP_REQUEST {
HTTP::redirect "https://www.mysite.com/myuri"
}