Forum Discussion
mikand_61525
Feb 17, 2012Nimbostratus
Replace (and remove) characters from URIs?
Im trying to setup an irule that will convert "\" into "/" and also remove redundant "/" (turning "//" into "/") for HTTP::uri.
What is the recommended way (performance wise) to do these two...
nitass
Feb 17, 2012Employee
in case not using data group.
e.g.
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
set uri [HTTP::uri]
set cvt_back_slash [string map {\\ /} $uri]
set rm_double_slash [string map {// /} $cvt_back_slash]
log local0. "$uri -> $rm_double_slash"
}
}
[root@ve1023:Active] config cat /var/log/ltm
Feb 17 03:30:43 local/tmm info tmm[4822]: Rule myrule : /test1\/test2/test3//test4 -> /test1/test2/test3/test4
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