473,657 Members | 2,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating and Implementing a 404 Page

I want to write and install a personalized "404 Error" page. How
do I do that?

I have over 200 HTML files on my Web site. I'm concerned that, if
I change or move a file, I might not detect all the other files
that link to it and thus require changes. A personalized "404
Error" page would inform visitors to my site how they can help me
correct such errors when they exist.

--

David E. Ross
<http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <http://www.mozilla.org/>.
Jul 20 '05 #1
12 3803
David Ross wrote:
I want to write and install a personalized "404 Error" page. How
do I do that?
Write the page as you would any other html document. As for how to
set it up, that depends on the server and configuration. If it's
Apache, you can add to the config file (e.g., .htaccess for a per
directory configuration) the following line:

ErrorDocument 404 /error404.html

Change the file name and path to point to your document.
I have over 200 HTML files on my Web site. I'm concerned that, if
I change or move a file, I might not detect all the other files
that link to it and thus require changes. A personalized "404
Error" page would inform visitors to my site how they can help me
correct such errors when they exist.


You shouldn't have to rely on visitors to detect missing files. Use a
link checker.

http://validator.w3.org/checklink

--
Brian
follow the directions in my address to email me

Jul 20 '05 #2
Brian wrote:

David Ross wrote:
I want to write and install a personalized "404 Error" page. How
do I do that?


Write the page as you would any other html document. As for how to
set it up, that depends on the server and configuration. If it's
Apache, you can add to the config file (e.g., .htaccess for a per
directory configuration) the following line:

ErrorDocument 404 /error404.html

Change the file name and path to point to your document.


Thank you. I did it, and it works like a charm. (Yes, my ISP
uses Apache.)
I have over 200 HTML files on my Web site. I'm concerned that, if
I change or move a file, I might not detect all the other files
that link to it and thus require changes. A personalized "404
Error" page would inform visitors to my site how they can help me
correct such errors when they exist.


You shouldn't have to rely on visitors to detect missing files. Use a
link checker.

http://validator.w3.org/checklink


I bookmarked the "checklink" page. I will try that soon.

--

David E. Ross
<http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <http://www.mozilla.org/>.
Jul 20 '05 #3

"Brian" <us*****@juliet remblay.com.inv alid-remove-this-part> wrote in
message news:9uRBb.3593 23$275.1179772@ attbi_s53...
Write the page as you would any other html document. As for how to
set it up, that depends on the server and configuration. If it's
Apache, you can add to the config file (e.g., .htaccess for a per
directory configuration) the following line:


As a warning to any "fine people notwithstanding their poor choice" using
Frontpage, I'm told to not try making a htaccess file. You'll end up having
to recode your whole site the right way.

This is second-hand info, so corrections to my statement are welcome.
Jul 20 '05 #4
"Neal" <ne**@spamrcn.c om> wrote:
As a warning to any "fine people notwithstanding their poor choice" using
Frontpage, I'm told to not try making a htaccess file.
I beg your pardon? How would the authoring software affect .htaccess, which
is something that a server uses without even looking at the content of HTML
documents, still less how they have been produced?

BTW, I'm just playing with FrontPage 2003, and it can actually be used to
produce and edit HTML pages pretty well. The problem with FP products is that
their user interface makes it all too easy to produce poorly written pages,
and you need to understand HTML and other Web affairs rather well to avoid
all the pitfalls on your own.
You'll end up having
to recode your whole site the right way.
Well, having to do things the right way isn't really a worst-case scenario in
my book, but I have no idea of what you are talking about.
This is second-hand info, so corrections to my statement are welcome.


It's impossible to correct your statement, since it didn't really contain any
factual information that could possibly be confirmed as correct or proved
counter-factural.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #5
Brian wrote:
You shouldn't have to rely on visitors to detect missing files. Use a
link checker.

http://validator.w3.org/checklink


Doesn't do well with javascript links, in particular it doesn't spot
errors/missing images in the rubbish dreamweaver leaves to preload
rollover images.

Chris

Jul 20 '05 #6
Chris Sharman <ch***********@ sorry.nospam> wrote in
news:br******** ***********@new s.demon.co.uk:
Brian wrote:
You shouldn't have to rely on visitors to detect missing files. Use a
link checker.

http://validator.w3.org/checklink


Doesn't do well with javascript links, in particular it doesn't spot
errors/missing images in the rubbish dreamweaver leaves to preload
rollover images.


Yet another reason not to *rely* on scripting for a function as important
as linking.
Jul 20 '05 #7
Chris Sharman <ch***********@ sorry.nospam> wrote:
Brian wrote:
You shouldn't have to rely on visitors to detect missing files. Use a
link checker.

http://validator.w3.org/checklink


Doesn't do well with javascript links,


Of course not - they're not links.
Google won't be able to follow them either.
Nor will any user without JS (for whatever reason).

Don't use JavaScript as the only means of reaching a page.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 20 '05 #8
Chris Sharman wrote:
Brian wrote:
Use a link checker.

http://validator.w3.org/checklink


Doesn't do well with javascript links


It doesn't process javascript, period. It is a link checker, not a js
checker.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #9
Eric Bohlman wrote:
Chris Sharman <ch***********@ sorry.nospam> wrote in
news:br******** ***********@new s.demon.co.uk:

Brian wrote:
You shouldn't have to rely on visitors to detect missing files. Use a
link checker.

http://validator.w3.org/checklink


Doesn't do well with javascript links, in particular it doesn't spot
errors/missing images in the rubbish dreamweaver leaves to preload
rollover images.


Yet another reason not to *rely* on scripting for a function as important
as linking.


Well personally, I'd be just as happy to use CSS for rollovers, but the
marketeers have decided they like flashy rollover images, as provided by
Dreamweaver. If you have them, you ideally want a body preload for them,
because a rollover really needs an instant, local, response.
I seem to spend a lots of time chasing down rubbish from Dreamweaver.
Ho hum.
I'd see it as a significant improvement it it processed any strings
found in <body onload=MM_prelo adImages('img1' ,...)> or similar (thereby
better supporting popular web authoring tools). I daresay the even more
dreaded Frontpage does something similar.
I'm not a fan of Dreamweaver, but I do have to work with the pages it
produces.
Suggested to the www-validator mailing address, anyway.

Chris

Jul 20 '05 #10

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

Similar topics

4
3683
by: Gurry | last post by:
Hi there I would like to write a javascript function that creates a drop-down list dynamically. I read on the docs that most HTML controls can not be created on run-time. what kind of work-arounds do you use in this case? maybe DHTML? do you have any example ? Javascript allows you to create the options of the drop-down list dynamically but not the drop-down list itself, I believe. Actually the same question goes for any other HTML...
6
2752
by: Martyn Lawson | last post by:
Hi, I am currently working as an Analyst on a .NET Web Project using ASP.NET and C#.NET. I have a couple of, at least what should be, quick questions: 1. My understanding of UML says that the Controller classe of a Sequence Diagram should be implemented as a private class within a component. However, my Programmer has said that since the ASP code lives outside the
2
1793
by: GMK | last post by:
HI ALL I'M COMING FROM A FOX PRO BACKGROUND WHERE I COULD IN A VERY EASY WAY CREATE A SEACH FACILITY BY PRESSING N F1 AND ANOTHER WINDOW WILL DIRECTLY APPEAR WHICH WOULD LET THE USER TO SEARCH FRO A SPECIFIC DATAVALUE AND INSERT IT IN A TEXTBOX IN THE ORIGINAL FORM. I WOULD LIKE TO CREATE A SIMILAR FACILITY IN ASP.NET I DON'T WANT A KEYPRESS FUNCTION I COULD CREATE A BUTTON ON THE SCREEN BUT I WANT TO CREATE A POPUP WINDOW WHERE I COULD...
8
1113
by: Stephen Adam | last post by:
Hi there, I am developing a web site with a number of pages, I want each page to have the same heading section which will include both the raw html and vb.net code which handle rollovers for some images which will also be included. My initial feeling on how to do this would be to create a base class web page and then inherit it with all the HTML response.writing and image rollover code already there. Problem being that my page already...
1
6452
by: Marcel Hug | last post by:
Hi NG ! I have already written a task about MVC and I tried to get the best informations together. I would like to implement the MVC pattern and it work on the way I did it. At first i know the MVC-ipmlementation from the JAVA by using the observer-pattern. I used an interface IObservable (AddObserver, RemoveObserver,...). My Model implemented this interface.
1
2130
by: Marko Vuksanovic | last post by:
I used the following code for implementing a file upload progress indicator, using UpdateProgress Panel, though I have a problem that FileUpload.Has File always returns false. Any suggestions what might be wrong? FileUpload2.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileUpload2.aspx.cs" Inherits="FileUpload2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
7
1302
by: Dave Keen | last post by:
Hi I am a relative newcomer and as usual I am stuck. My ASP.Net 2003 app has a page which shows data from a database plus an associated picture. I use an ASP image control sized to 300x300px. All the images are already the right size - ie maximum 300px, but this control stretches the (usually non-square) image to fit the 300x300 area, and I don't want distorted images. tag, but while I can format that string, how do I get that into...
6
3981
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public string UID; public string PWD; }
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.