Forum Discussion
Nov 21, 2006
The built-in string map TCL command is probably what you'll want.
Here's an example:
when HTTP_REQUEST {
set query [HTTP::query]
set new_query [string map {goto=http% goto=https% %3A80% %3A443% %3DEN %3DFR} $query]
HTTP::query $new_query
}
-or- in one line:
when HTTP_REQUEST {
HTTP::query [string map {goto=http% goto=https% %3A80% %3A443% %3DEN %3DFR} [HTTP::query]]
}
The first one is better for debugging...
-Joe