Circumventing the 404 error

  • Thread starter Thread starter David Jackson
  • Start date Start date
D

David Jackson

Hello,

I understand that I can add something like this to my web.config:

<customErrors mode="RemoteOnly" defaultRedirect="~/error.apsx">
<error statusCode="404" redirect="~/PageNotFound.htm" />
</customErrors>

which will redirect users to the page specified if e.g. someone typed in
http://www.mywebsite.com/thispagedoesnotexist.aspx, but this will not work
for file types which are not handled by ASP.NET - is that correct?

E.g. if someone typed in http://www.mysite.com/thispagedoesnotexist.htm,
they'll get the standard 404 page, right?

I understand that it's possible to modify this behaviour in IIS, but in the
case of a publicly hosted website where the ISP does not allow this, are
there any other options short of moving ISP?

Thank you.

DJ
 
in message
Hello Peter,
That is correct. However, many hosting companies allow you to set a custom
404 page, which could be an ASPX page. In fact, I use this for
extensionless
URL rewriting on a hosted site.

Thank you for the confirmation. The ISP in question (GoDaddy.com) does not
support this. I've had a quick look around for other ISPs and most as you
say do support this although some charge a fee. I will recommend changing
ISP.

Thank you.

DJ
 
Back
Top