Forum Discussion
Jay_Allison_400
Nimbostratus
May 22, 2007URI replace help
quite simply i'm trying to replace certain characters in a URI path with other characters, this was my first stab at it, doesn't seem to be working, any suggestions?
when HTTP_REQUEST {
URI::path [string map {~ ~ZZ % ~} [HTTP::uri]]
}
Tried a few other variations including backslashes and this
when HTTP_REQUEST {
URI::path [string map {~ ~ZZ % ~} URI::path]
}
haven't hit on one one that has worked yet
2 Replies
- Jay_Allison_400
Nimbostratus
So I got this to work fine
when HTTP_REQUEST {
HTTP::uri [string map {\~ \~ZZ \% \~} [HTTP::uri]]
}
but i really only want to affect the URI::path - JRahm
Admin
Try replacing the uri command with the path command in your string map, then append the query when you set your new uri:
HTTP::uri [string map {\~ \~ZZ \% \~} [HTTP::path]][HTTP::query]
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