iRule Recipe 1: Single URL Explicit Redirect
Updated Jun 06, 2023
Version 2.0Was this article helpful?
Thanks for the article! It was helpful, but I'm still having trouble getting an iRule to work for http redirects. If a user comes with a specific path /newpath I need it redirected to a different site, if the user does not specify the path I need it redirected to another site. This is what I have, but it's not working properly. Any help would be appreciated.
when HTTP_REQUEST { if { (([HTTP::host] equals "site.com/newpath") or ([HTTP::host] equals ";)) } { HTTP::redirect "; }
else {(([HTTP::host] equals "site.com") or ([HTTP::host] equals ";)) } HTTP::redirect "; }