PC Review


Reply
Thread Tools Rate Thread

Circumventing the 404 error

 
 
David Jackson
Guest
Posts: n/a
 
      8th Oct 2007
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



 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      8th Oct 2007
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.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com



"David Jackson" wrote:

> 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
>
>
>
>

 
Reply With Quote
 
David Jackson
Guest
Posts: n/a
 
      8th Oct 2007
"Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote
in message news:09A0FF10-80D3-4F7A-800A-(E-Mail Removed)...

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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Circumventing Inconvenience Error by Opening DB in Prior Access Version robert demo via AccessMonster.com Microsoft Access Forms 5 12th Jul 2005 03:24 PM
circumventing CreateDirectory() errors Tim Mulholland Microsoft ASP .NET 1 17th Nov 2004 03:56 AM
Wiindows File Protection - circumventing =?Utf-8?B?U2ViYXN0aWFu?= Windows XP Security 4 13th Nov 2004 06:23 PM
Circumventing Data Validation Jim & Gail Microsoft Excel Misc 1 23rd Jul 2004 09:07 PM
Circumventing Corp Firewall in an appropriate manner. Dave Windows Networking 3 23rd Dec 2003 02:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:57 PM.