Do you want to take the whole URI and set it as a parameter value? If so, you should URI encode the value:
when HTTP_REQUEST {
Check if the URI set to lower case starts with /anything
if { [string tolower [HTTP::uri]] starts_with "/anything" } {
Rewrite the URI to /default.aspx with a new parameter and the value set to the URI encoded original URI
HTTP::uri "/default.aspx?original_uri=[URI::encode [HTTP::uri]]"
}
}
If you want to rewrite all URI’s you can just remove the if clause:
when HTTP_REQUEST {
Rewrite the URI to /default.aspx with a new parameter
and the value set to the URI encoded original URI
HTTP::uri "/default.aspx?original_uri=[URI::encode [HTTP::uri]]"
}
You’d need to change the application to URI decode the original_uri parameter value.