Forum Discussion
Jay_Prasanth_13
Nimbostratus
Dec 05, 2013How to force HTTPS on masked uri?
can anyone help me to force HTTPS on masked uri?
For eg :
if {[HTTP::uri] eq "/dd"
HTTP::uri "/xx/yyy/ddd"
Current outcome - http://mysite/dd , however HTTPS works if mention explicitly.
...
IheartF5_45022
Nacreous
Dec 05, 2013so 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
Nimbostratus
Dec 16, 2013I missed this one ... , HTTPS://XX.COM/YYY/DD is a vanity URL .
You are right , we have 80 and 443 , the iRule you have stated is already in place , it forces HTTPS for default URL's , but not for VANITY URL's.
Eg.
in current setup ,when I type in the browser , http://xx.com --> it redirects to https://xx.com/yyy/dd
requirement is if I type explicitly , http://xx.com/dd --> it should redirects internally to vanity URL https://xx.com/yyy/dd ( should hide /yyy and force https )
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects