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!

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

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 /.