Forum Discussion
siyadh_121603
Nimbostratus
Aug 14, 2014Rewrite http redirect from one VIP to another VIP
Hi,
We have to make iRule, which should redirect to another VIP in the same LTM if one specific URL trigger.
eg: request URL : http://abc/xyz
redirect URL: http://abc:40001
Thomas_Gobet_91
Cirrostratus
Aug 14, 2014I'm sorry typo mistake due to autocorrect... This is not "to lower" but "tolower".
Sorry.when HTTP_REQUEST {
if {([string tolower [HTTP::uri]] contains "/xyz") and [string tolower [HTTP::host]] equals "abc"}{
HTTP::redirect http://abc:40001;
}
}
LyonsG_85618
Cirrostratus
Aug 15, 2014You may prefer to have:
starts_with "/xyz"
If you use contains iRule will check the whole URI for /xyz? i.e. it will not only match http://abc/xyz but also http://abc/123/456/xyz
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects