Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > change 'not found' page

Reply
Thread Tools

change 'not found' page

 
 
Lloyd
Guest
Posts: n/a
 
      12-24-2004
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


 
Reply With Quote
 
 
 
 
Neal
Guest
Posts: n/a
 
      12-24-2004
On Fri, 24 Dec 2004 22:27:54 GMT, Lloyd <(E-Mail Removed)> 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
 
 
 
 
Lloyd
Guest
Posts: n/a
 
      12-24-2004
> On Fri, 24 Dec 2004 22:27:54 GMT, Lloyd <(E-Mail Removed)> 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
 
Lloyd
Guest
Posts: n/a
 
      12-24-2004
> 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
 
Neal
Guest
Posts: n/a
 
      12-24-2004
On Fri, 24 Dec 2004 23:26:37 GMT, Lloyd <(E-Mail Removed)> 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
 
Lloyd
Guest
Posts: n/a
 
      12-24-2004
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
 
Dylan Parry
Guest
Posts: n/a
 
      12-24-2004
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
 
Richard
Guest
Posts: n/a
 
      12-25-2004
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
 
Lloyd
Guest
Posts: n/a
 
      12-25-2004
> 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
 
Jukka K. Korpela
Guest
Posts: n/a
 
      12-25-2004
"Lloyd" <(E-Mail Removed)> 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

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
How to Update or Change the Master Page Variables from a different Page? savvy ASP .Net 9 07-03-2007 04:00 PM
Can I change the response URL to http://server/page.XLS instead of http://server/page.ASPX ? guillermojco@gmail.com ASP .Net 3 04-26-2007 04:49 AM
Change the master GridView after detail change? Q. John Chen ASP .Net 0 11-15-2006 05:31 PM
Change the master GridView after detail change? Q. John Chen ASP .Net 0 11-15-2006 05:30 PM
A Paradise DNS address change? What change? There was no change. Tony Neville NZ Computing 7 09-22-2006 01:02 PM



Advertisments