Forum Discussion
Hoang_Hung
Cirrus
Jul 27, 2020redirect http to https URI
Hi all How do you do redirect uri : redirectURL=http://pcmuat-bo.ena.com:80/ARXAL/AALIndex.jsp&userType=Cop change to redirectURL=https://pcmuat-bo.ena.com:80/ARXAL/AALIndex.jsp&userType=Cop Exampl...
Hoang_Hung
Cirrus
Jul 28, 2020Hi Eaa
We have try test. it redirected ok.
But I so sorry. We would like Redirect:
https://pcmuat-bo.ena.com/ARXAuth/LoginScreen.jsp?redirectURL=https://pcmuat-bo.ena.com: 443/ARXAL/AALIndex.jsp&userType=Cop
After apply irule
https://pcmuat-bo.vietcombank.com.vn/ARXAuth/LoginScreen.jsp?redirectURL=https://pcmuat-bo.vietcombank.com.vn:80/ARXAL/AALIndex.jsp&userType=Bank
We hope that it will change port to 443 for URI
How do you do for solution ?
Thanks Eaa
Jul 28, 2020
Hi,
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/ARXAuth/LoginScreen.jsp?redirectURL=http://" } {
set urifirst [string map -nocase {"http://" "https://"} [HTTP::uri]]
set urilast [string map -nocase {":80/" ":443/"} $urifirst]
HTTP::redirect "https://[HTTP::host]$urilast"
}
}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