Circumventing the 404 error

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
 
D

David Jackson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,965
Messages
2,570,148
Members
46,710
Latest member
FredricRen

Latest Threads

Top