dkinsler_23191
Dec 10, 2010Nimbostratus
problem with HTTP::redirect
Hi all, I am trying to do a redirect but I am getting a strange result. My code looks like this....
when HTTP_REQUEST {
if { ([HTTP::host] equals "abc.com") and ([HTTP::uri] equals "/enroll")} {
HTTP::redirect "www.xyz.com/test/enrollment/home.aspx"
}
if { ([HTTP::host] equals "www.abc.com") and ([HTTP::uri] equals "/enroll")} {
HTTP::redirect "www.xyz.com/test/enrollment/home.aspx"
}
}
But the result I am getting on the redirect is. (from httpwatch)
Redirect A redirect to http://abc.com/www.xyz.com/test/enrollment/home.aspx was issued by the server
I have also tried changing HTTP::redirect "www.xyz.com/test/enrollment/home.aspx" to
HTTP::respond 301 Location "www.xyz.com/test/enrollment/home.aspx"
but basically get the same thing. Any ideas why I keep getting the "abc.com before the URL I want to redirect to?