Forum Discussion

Paul_Zajicek_73's avatar
Paul_Zajicek_73
Icon for Nimbostratus rankNimbostratus
Jan 10, 2007

Redirect 404 pages and not images

Hi,

 

Can anybody explain why the following redirects both 404's from missing pages AND missing images, (redirecting when its only a missing image can cause us problems).

 

 

when HTTP_RESPONSE {

 

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

 

if { [HTTP::header "Content-Type"] starts_with "text/" } {

 

HTTP::redirect "http://www.homepage.com/"

 

}

 

}

 

}

 

 

Thanks.
  • bl0ndie_127134's avatar
    bl0ndie_127134
    Historic F5 Account
    If your http://www.homepage.com/ contains any broken links, you are effectively sending your browser in an infinite loop. A smart browser might work around this but then again it may not.