473,394 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Circumventing the 404 error

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

Oct 8 '07 #1
2 991
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

Oct 8 '07 #2
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yohohhoandabottleofrum.comwrote
in message news:09**********************************@microsof t.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
Oct 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
1
by: Aravind | last post by:
we have two files: 1. rc4.c (defines one function "create_pin()") 2. MyImpl.c(calling the function "create_pin()"),This implements JNI method. 1.When I am trying to create .dll file with one...
1
by: yanwan | last post by:
I met this problem in executing a c++ project in visual studio. Does anyone have suggestions to resolve "error lnk 2001"? --------------------Configuration: reconstruction - Win32...
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
9
by: D.J. Stachniak | last post by:
Hi, I have a question about explicit constructors and the C++ standard. Forgive me for my laziness in not pouring over the spec myself, but I thought I'd ask first and read later. I have a...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.