Welcome Guest Search | Active Topics | Members | Log In | Register

Circumventing the 404 error Options · View
David Jackson
Posted: Monday, October 08, 2007 12:57:33 PM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 08/10/2007 12:57:33
Date: Mon, 8 Oct 2007 11:57:33 +0100

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



David Jackson
Posted: Monday, October 08, 2007 1:58:08 PM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 08/10/2007 13:58:08
Date: Mon, 8 Oct 2007 12:58:08 +0100

"Peter Bromberg [C# MVP]" <pbromberg@yahoo.yohohhoandabottleofrum.com> wrote
in message news:09A0FF10-80D3-4F7A-800A-DBCCBF9D0BA9@microsoft.com...

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


Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.1 (NET v2.0) - 9/10/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.602 seconds.