Hello,
I am trying to capture the 404 error from the
www.myforumswebsite.com/myforum but I always get the remote 404 error page. If I go to
www.abc.com/doesnotexist I get the custom 404 error which I have pasted below. If go to
www.abc.com/forum/doesnotexist I get the error page from the
www.myforumswebsite.com server. I want it to use the custom one I have below. How do I get the irule to capture the other 404?
---- code ----
when RULE_INIT {
set error_404 {
404 File or Page Not Found
[HTTP::status] Error
Page Not Found
The requested URL
$HTTP_URI
was not found on this server.
}
}
when HTTP_REQUEST {
set HTTP_URI [HTTP::uri]
}
when HTTP_RESPONSE {
if { [HTTP::status] == 404 } {
HTTP::respond 404 content [subst $::error_404]
}
}
--code ---
Thanks,
Aaron