Forum Discussion
iRuless https to https path redirection
Hi,
I am trying to get the code correct for a simple URL redirect. I will need it to work https://abc.com redirects to https://abc.com/123
Any help with this will be greatly appreciated
Thanks!
- tiziano_rosato_
Nimbostratus
If you like to use ltm policy insted of irule you can have a look here:
https://devcentral.f5.com/articles/inside-the-big-ip-simple-url-redirects-32269
- R__Hickman_1172
Nimbostratus
As tiziano rosato mentioned- a LTM policy would work and be pretty easy, but if you would rather do an iRule - this is one I use frequently for these kind of URI redirects:
when HTTP_REQUEST { if {[HTTP::uri] equals {/}} {HTTP::uri {/123} } }
This assumes we don't care so much about the host URL, only what comes after the /.
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