Forum Discussion
IheartF5_45022
Dec 19, 2013Nacreous
Hi Jay,
If what you want when a user enters http://xx.com/dd is for;-
- the user to be redirected to https://xx.com/dd
- for https://xx.com/dd to internally call /yyy/dd
Then the iRules snippet I gave above, if applied to both the http/https virtuals, will do what you want (reproduced here with minor change)
when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] eq "/dd"} {
if {[TCP::local_port] == 80} {
Force to HTTPS
HTTP::redirect "https://[HTTP:host][HTTP::uri]
return
} else {
It's already HTTPS, rewrite URI
HTTP::uri "/yyy/dd"
}
}
}
Otherwise I am unsure what is needed.