Forum Discussion
Danny_Arroyo
Cirrus
Sep 03, 2013How do I change an incoming uri to a different string before the VIP sends it to the Pool?
I expect the users to enter the following uri:
http://server.domain.com/webapplication?frc=AO
I want the irule to convert the uri to the following:
http://server.domain.com/flexiblewebapplicatio...
Kevin_Stewart
Employee
Sep 04, 2013Depending on BIG-IP version (don't recall when it changed) the HTTP::uri command will always return what's in the request buffer, even if you've changed it inline. So what you're seeing in the last log statement is to be expected. Other than that, here's a slight modification to your iRule:
when HTTP_REQUEST {
log local0. "Request Before if statement: [HTTP::uri]"
if { ( [string tolower [HTTP::host]] equals "server.domain.com" ) and ( [string tolower [HTTP::uri]] starts_with "/webapplication?frc=AO" ) } {
log local0. "We are inside the if statement"
HTTP::uri "/flexiblewebapplication/index.jsp?frc=A0"
}
}
If that still fails, then what happens if you navigate to "/flexiblewebapplication/index.jsp?frc=A0" directly?
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