Forum Discussion

Hans_Hovbratt_1's avatar
Hans_Hovbratt_1
Icon for Nimbostratus rankNimbostratus
Dec 01, 2006

Add variable to a redirect?

I want to redirect error 404 to a site. On the page the redirect goes to I would like to see what URL the user was trying to browse. I can send a variable with the redirect but can I post the URL that the user was trying to access?

 

 

when HTTP_RESPONSE {

 

if { [HTTP::status] contains "404" }{

 

redirect to "http://site.domain.com:88/message.asp?orgURL=here I want the URL"

 

}

 

}

 

 

 

Best Regs

 

Hans

1 Reply

  • Hi Hans,

     

     

    [HTTP::host][HTTP::uri] will get you the host and URI. I suppose you could assume the protocol based on the virtual server's port.

     

     

    redirect to "http://site.domain.com:88/message.asp?orgURL=[HTTP::host][HTTP::uri]"

     

     

    Aaron