This is how I'd do it:
when HTTP_REQUEST {
if { [HTTP::host] eq "dummywebsite.com" } {
HTTP::redirect "http://www.[HTTP::host][HTTP::uri]" }
}
I think you can use [HTTP::host] from within the HTTP::redirect event...if you can't, the following should work:
This is how I'd do it:
when HTTP_REQUEST {
if { [HTTP::host] eq "dummywebsite.com" } {
HTTP::redirect "http://www.dummywebsite.com[HTTP::uri]" }
}
In your example, you're replacing a header on the way to the server...and you'd have to specify that it's the "host" header that you want to rewrite.