Forum Discussion
2 Replies
Sort By
- Josiah_39459Historic F5 Account
when HTTP_REQUEST { HTTP::redirect https://www.mysite.com/myuri }
- VernonWellsEmployee
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" }