HTTPS to HTTPS redirect in F5
Hi,
Please help me to create an irule or policy to redirect https://loadandgo.test.ca to https://www.test.ca/arrow/Redirect?id=45156_Rexall_LoadandGo_E. I'm not sure what service port should I use since I already tried different options and none of them did work. Whenever I try to load https://loadandgo.test.ca none of the rules worked nor policy I created. it only works when I use service port 80 and load http not https(which I need) in this case. Irules used so far:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "www.example.com" and [HTTP::path] eq "/path1/abc" } {
HTTP::respond 301 Location "http://www.new-example.com/abcd"
}
}
when HTTP_REQUEST {
1. if { [HTTP::host] eq "website1.com" } {
2. HTTP::redirect https://websitesite2.com[HTTP::uri]
3. }
1. when HTTP_REQUEST {
2. if { ([string tolower [HTTP::host]] equals "page1.com") && ([TCP::local_port] == 443)} {
3. HTTP::redirect "http://page2.com"
4. }
5. }
1. when HTTP_REQUEST {
2. if { ([string tolower [HTTP::host]] equals " page1.com") && ([TCP::local_port] == 443)} {
3. HTTP::redirect " http://page2.com"
4. }
}