Forum Discussion
F5_LB_Eng
Jul 28, 2009Cirrostratus
Hi All,
I want to redirect http to https and https to https.
for exam http://prasanna.f5.com to https://prasanna.dev.f5.com , https://prasanna.f5.com to https://prasanna.dev.f5.com
i write the irule like below.
when HTTP_REQUEST {
if { ([HTTP::host] equals "prasanna.f5.com") } {
HTTP::respond 301 Location "https://prasanna.dev.f5.com[HTTP::uri]"
}
else {
HTTP::respond 301 Location https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
}
but the customer want now
http://*/* -> https://prasanna.dev.f5.com/*
https://*/* -> https://prasanna.dev.f5.com/*
can you please help me on this irule.
Regards
Prasanna AR