Forum Discussion
IheartF5_45022
Nacreous
so if I am correctly interpreting your requirements, you want to force /dd to HTTPS, and if it is HTTPS, rewrite the URI to /xx/yyy/ddd?
when HTTP_REQUEST {
if {[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 "/xx/yyy/ddd"
}
}
Jay_Prasanth_13
Dec 16, 2013Nimbostratus
To be more precise . Actual requirement from the business is to mask url from HTTPS://XX.COM/YYY/DD to HTTPS://XX.COM/DD .
/YYY to be hidden
I attained this by ..
when HTTP_REQUEST {
if {[HTTP::uri] eq "/dd" }{
HTTP::uri "/yyy/dd"
}
}
With the above iRule , http and https working fine individually. But the requirement is to force http to https.