Forum Discussion
redirect http to https URI
Hi Hoang Hung,
Can you try this?
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/ARXAuth/LoginScreen.jsp?redirectURL=http://" } {
set uri [string map -nocase {"http://" "https://"} [HTTP::uri]]
HTTP::redirect "https://[HTTP::host]$uri"
}
}- Hoang_HungJul 27, 2020
Cirrus
Hi 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" } } - Hoang_HungJul 28, 2020
Cirrus
Thank Eaa
Thanks you. We will try it and reply to your.
Thanks you so much
Recent Discussions
Related Content
* 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