Forum Discussion
Redirect iRule for specific URI's for a Single VIP.
Hello,
I have a requirement where I need to have some redirects enabled to the VIP, the requirement is a combination, and I want to know whether this can be implemented in a single iRule.If so can someone let me know that. Below is the information.
-
Any URL containing “abc.com/uvw” be automatically redirected to https://www.abc.com/uvw/xyz.html
-
abc.com/def (with or without the .) should automatically redirected to https://www.abc.com/def
Is this possible to implement in a single iRule or do we need to tag two seperate iRules . Please let me know.
Thanks.
1 Reply
- Anesh
Cirrostratus
try
when HTTP_REQUEST { if { !([HTTP::host] starts_with "www.") && ([HTTP::uri] conatins "def") }{ HTTP::redirect "https://www.[HTTP::host]/def" }elseif {[HTTP::uri] conatins "uvw"}{ HTTP::redirect https://www.[HTTP::host]/uvw/xyz.html } }
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