Forum Discussion
fhlostonp_19913
Nimbostratus
Apr 24, 2015IRULE for HTTP string manipulation
I need help with creating a rule that will look for a key word and then redirect to a different VIP with the rest of the HTTP string intact.
For example,
Header comes with http://www.f5.com...
fhlostonp_19913
Nimbostratus
Apr 27, 2015Thanks for the reply. Yes I need it more dynamic. The examples I used are not clear. Sorry about that.
Original string http://www.f5.com/abc/TRIGGER/doc/1234
Redirect string http://new.f5.com/abc/TRIGGER/doc/1234
Using the suggestions above, I came up with the following rule. I will try and test.
when RULE_INIT { set static::newhostname "new.f5.com" } when HTTP_REQUEST { if { [HTTP::uri] contains "TRIGGER" }{ HTTP::redirect "http://${static::newhostname}[HTTP::uri]]" } }
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