Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 07-07-2004, 09:58 AM error 404
Spud In Disguise's Avatar
Super Spam Talker

Posts: 808
Location: UK... where else?
Trades: 0
Can someone explain to me how to do this please...

I've seen on some sites that if I enter a page name wrong, that doesn't exist within a domain where the normal white background error 404 message comes up there is a different document styled by the website makers, and with all the other codes. Does anyone know how to achieve this please...
Spud In Disguise is offline
Reply With Quote
View Public Profile Visit Spud In Disguise's homepage!
 
 
Register now for full access!
Old 07-07-2004, 11:52 AM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
You can write custom error pages then upload them to your site. Web servers, by default, call certain files when they receive a given error (configurable, of course).

I'm working from memory here, but I think you can simply name the file 404.htm or 404.html.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 07-07-2004, 11:54 AM
Average Talker

Posts: 19
Trades: 0
If your on a Unix server one way to do this is to upload a .htaccess file with the following:

ErrorDocument 404 /custom-error-page.html

that's assuming your host has this feature turned on also on your FTP software you'll need to have Remote File Mask set to -al to view the file once its uploaded.
__________________
-

Please login or register to view this content. Registration is FREE
gooner is offline
Reply With Quote
View Public Profile
 
Old 07-07-2004, 12:27 PM It depends on your server
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
Apache allows you to define errors like so,
Apache 2 at least anyway.

I cant remember for 1.3 (shocking)

edit the httpd.conf and search for something like below:

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
ErrorDocument 500 /error/500.html
ErrorDocument 404 /error/404.html

As you can see this section has three parts to each error response.

ErrorDocument:
Number:
File/ text:

Allways start with ErrorDocument, followed by number which is the error reported I.E 404 and finish with a file or some text.

Then go to the error directory (normally under /var/www/error)
create your 404.html and so on.

Throw in some css and html and you can make pretty error pages.
I assume this will also work the same with apache windows.

Other web server will have something similar just grab your server docs and it will explain it to you.

Ibbo

Last edited by ibbo; 07-07-2004 at 12:32 PM..
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Old 07-07-2004, 12:28 PM 404, 500.html all ok file names
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
Quote:
Originally Posted by Kyrnt
You can write custom error pages then upload them to your site. Web servers, by default, call certain files when they receive a given error (configurable, of course).

I'm working from memory here, but I think you can simply name the file 404.htm or 404.html.
You can and I do.

Ibbo
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Old 07-07-2004, 12:59 PM
Spud In Disguise's Avatar
Super Spam Talker

Posts: 808
Location: UK... where else?
Trades: 0
Ok thanks will try the first idea (naming a 404.htm file) If you have any more ideas please let me know, but I will let you know if that works (most likely some time tomorrow).

Thanks.
Spud In Disguise is offline
Reply With Quote
View Public Profile Visit Spud In Disguise's homepage!
 
Reply     « Reply to error 404
 

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20678 seconds with 12 queries