Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - change 'not found' page

 
Thread Tools Search this Thread
Old 12-24-2004, 10:27 PM   #1
Default change 'not found' page


Is there a way to change what a person sees on my site when they type in,
or get a bad url?
I see this:
The page cannot be found
On other sites I see different messages, I would like to customise mine.
Thanks in advance,
Lloyd




Lloyd
  Reply With Quote
Old 12-24-2004, 10:49 PM   #2
Neal
 
Posts: n/a
Default Re: change 'not found' page

On Fri, 24 Dec 2004 22:27:54 GMT, Lloyd <> wrote:

> Is there a way to change what a person sees on my site when they type
> in,
> or get a bad url?
> I see this:
> The page cannot be found
> On other sites I see different messages, I would like to customise mine.


This assumes you are on an Apache or similar server.

Create an error page, save it as say "error.html".

Then in a blank document add this line:

ErrorDocument 404 http://www.example.com/error.html

replacing your domain and path to the error document for the example path
above.

Save this file to your root directory with the name ".htaccess" - dot and
all.
  Reply With Quote
Old 12-24-2004, 11:03 PM   #3
Lloyd
 
Posts: n/a
Default Re: change 'not found' page

> On Fri, 24 Dec 2004 22:27:54 GMT, Lloyd <> wrote:
>
>> Is there a way to change what a person sees on my site when they type
>> in,
>> or get a bad url?
>> I see this:
>> The page cannot be found
>> On other sites I see different messages, I would like to customise mine.

>
> This assumes you are on an Apache or similar server.
>
> Create an error page, save it as say "error.html".
>
> Then in a blank document add this line:
>
> ErrorDocument 404 http://www.example.com/error.html
>
> replacing your domain and path to the error document for the example path
> above.
>
> Save this file to your root directory with the name ".htaccess" - dot and
> all.


Thak you! I'll give it a shot
Merry Christmas......


  Reply With Quote
Old 12-24-2004, 11:26 PM   #4
Lloyd
 
Posts: n/a
Default Re: change 'not found' page

> Create an error page, save it as say "error.html".
>
> Then in a blank document add this line:
>
> ErrorDocument 404 http://www.example.com/error.html
>
> replacing your domain and path to the error document for the example path
> above.
>
> Save this file to your root directory with the name ".htaccess" - dot and
> all.


it's an Apache server, I followed all instructions:
it would not let me make a file called .htaccess on my win xp so after I
uploaded it using cuteftp, I renamed it and it disappeared! When I type a
bad url in, it just does nothing, (xp flag keeps waving)
How to I find my .htacess if I need to edit it?
Thanks
Lloyd


  Reply With Quote
Old 12-24-2004, 11:32 PM   #5
Neal
 
Posts: n/a
Default Re: change 'not found' page

On Fri, 24 Dec 2004 23:26:37 GMT, Lloyd <> wrote:

> it would not let me make a file called .htaccess on my win xp so after I
> uploaded it using cuteftp, I renamed it and it disappeared!


XP probably does not recognize it as real, it's pretty stupid.

> When I type a
> bad url in, it just does nothing, (xp flag keeps waving)
> How to I find my .htacess if I need to edit it?


You can only access it with FTP, really. I use Crimson Editor
<http://www.crimsoneditor.com/> to do most uploading and editing. If your
FTP program isn't working try that. It's a free download.

When you FTP in you should see all the files in your main directory,
..htaccess should be there. If not, you should be able to create it with CE.
  Reply With Quote
Old 12-24-2004, 11:35 PM   #6
Lloyd
 
Posts: n/a
Default Re: change 'not found' page

I got it working, I was calling error.html and had error.htm (missing 'l'),
I still can't find the .htaccess file, does it become hidden on the server
directory?
Thanks


  Reply With Quote
Old 12-24-2004, 11:44 PM   #7
Dylan Parry
 
Posts: n/a
Default Re: change 'not found' page

Lloyd wrote:

> I still can't find the .htaccess file, does it become hidden on the server
> directory?


Yes, the "." in the filename is a Unix convention for specifying that a
file should be hidden. You should be able to find a setting somewhere in
your FTP client that allows you to see hidden files though.

--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
  Reply With Quote
Old 12-25-2004, 02:38 AM   #8
Richard
 
Posts: n/a
Default Re: change 'not found' page

Lloyd wrote:

> Is there a way to change what a person sees on my site when they type in,
> or get a bad url?
> I see this:
> The page cannot be found
> On other sites I see different messages, I would like to customise mine.
> Thanks in advance,
> Lloyd


Ask your host how to proceed with customizable 404 pages before doing it on
your own.



  Reply With Quote
Old 12-25-2004, 05:24 AM   #9
Lloyd
 
Posts: n/a
Default Re: change 'not found' page

> Ask your host how to proceed with customizable 404 pages before doing it
> on
> your own.
>

I have it all fixed thanx to other posters, merry Christmas!


  Reply With Quote
Old 12-25-2004, 01:13 PM   #10
Jukka K. Korpela
 
Posts: n/a
Default Re: change 'not found' page

"Lloyd" <> wrote:

> Is there a way to change what a person sees on my site when they
> type in,
> or get a bad url?


Probably. Others have already discussed the technicalities.

> On other sites I see different messages, I would like to customise
> mine.


While that's understandable, and recommended by useability experts, it
is _very_ easy to go wrong and create an error page that is _worse_
than the default one, at least for a large number of potential users.
A common error (when the pages are not in English) is to include the
error message in the language of the pages _only_.

So make sure you are making an improvement, so that the error page is
more understandable and more informative. For some notes see
http://www.cs.tut.fi/~jkorpela/www/404.html

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


  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump