Forum Discussion
C_D_18583
Nimbostratus
May 07, 2008How to modify the PATH of the URI
How do I modify the path of the URI ?
(EG)
from: domainname/path/to/my/service
to domainname/myservice
I want to be able to strip /path/to...
Colin_Walker_12
May 07, 2008Historic F5 Account
If you're looking to take whatever URI comes in, assuming it has a certain service name on the end, and update the URI with the one above, you'd want something like:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri] {
"*service" {
HTTP::uri "/myservice"
}
}
}
If there are only certain URIs you want to replace, you can set those up in the switch as well.
Colin
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
