Forum Discussion
Emad
Cirrostratus
Jul 31, 2013Irule replace specific URI
I need replace a set if URI from my URL with single one.
e.g
I have these URLs which are being used now
www.123.com/app/cs/aaa,jsp
www.123.com/app/cs/bbb,jsp
www.123.co...
Kevin_Stewart
Employee
Jul 31, 2013
when HTTP_REQUEST {
log local0. "Incoming URI = [HTTP::uri]"
if { [string tolower [HTTP::uri]] starts_with "/app/cs" } {
set uri [string map -nocase {"/app/cs" "/cas"} [HTTP::uri]]
log local0. "New URI = $uri"
HTTP::uri $uri
}
}
** disable the logging statements once you've verified correct operation.
Also note that this transparently changes the request URI on ingress traffic (the client browser does not see the change). If you need to change "/app/cs" instances in outgoing payload (headers, redirects, object references), then a STREAM profile iRule is in order.
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