david0512_20548
Oct 09, 2014Nimbostratus
http redirect issue with $ character
Hi All
I have the following redirect setup and it seems to work aprt form when the $ character is inserted into the rule.
when HTTP_REQUEST {
if { [HTTP::host] equals "www.thiswebsite.com" and [HTTP::uri] starts_with "/t/$1" } {
HTTP::redirect "http://www.thiswebsite2.com/www.thiswebsite.com/t/$1"
}
}
The problem however is that the virtual server responds with a receive failure. There is something about the $ that the F5 VS doesnt like.
Any pointers would be appreciated
The $1 is being treated as a variable. Escape the dollar-sign in both locations with a "\" to match "$1":
/t/\$1