Forum Discussion
Michael_Yates
Jun 03, 2010Nimbostratus
Here is an example to capture a 301 and 302 and redirect them.
First one is to redirect to a different website.
Second one is to redirect back to the base page. You could also redirect them to a pretty error page, etc.
when HTTP_RESPONSE {
if { [HTTP::status] == "301" } {
HTTP::redirect "http://www.website.com/"
}
elseif { [HTTP::status] == "302" } {
HTTP::redirect "http://[HTTP::host]/index.html"
}
}