Forum Discussion
redirect http to https and remove port number in redirected URL
Hi Experts, Please help me on this.
redirect requirements are following:
http://appadmin.com:9081/desktop/desktop.htm redirect to https://appadmin.com/desktop/desktop.htm http://appadmin.com:9081/tpadmintool/default.htm rediect to https://appadmin.com/tpadmintool/default.htm http://appadmin.com:1082/english/ redirect to https://appadmin.com/english/
so basically removing port number and redirecting http to https.
in current config I have four VIPs with same IP but different port numbers like HTTP, HTTPS, 9081 and 1082. Non-HTTPs VIPS have sys_https_redirect rule on it and HTTPS VIP has irule which redirect to corresponding URL by removing port number.
Is there a short and efficient config I can use for same requirements?
- JacobCaballero
Nimbostratus
Try this irule:
when HTTP_REQUEST { http::respond 302 https://[HTTP::host/[HTTP::uri] }
Hope this helps!
- Stanislas_Piro2
Cumulonimbus
This is the default _sys_https_redirect irule behavior!!!!
No need to write your irule, f5 already created it and include it in f5 product.
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