Forum Discussion
redirect 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
Example:
https://pcmuat-bo.ena.com/ARXAuth/LoginScreen.jsp?redirectURL=http://pcmuat-bo.ena.com:80/ARXAL/AALIndex.jsp&userType=Cop
--------------------------------------
Redirect
https://pcmuat-bo.ena.com/ARXAuth/LoginScreen.jsp?redirectURL=https://pcmuat-bo.ena.com/ARXAL/AALIndex.jsp&userType=Cop
Thanks all
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_Hung
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
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" } }
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