Go Back   DNtalks.Com > Design & Development > Webmaster Tutorials

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-25-2007, 07:07 PM   #1 (permalink)
Josh
Junior Member
 
Join Date: Jan 2007
Posts: 10
DN$: 24
Josh is on a distinguished road
Default Custom Error Pages with Apache

Information about Status Codes: HTTP/1.1: Status Code Definitions


In this tutorial I will be showing you how to be creating error pages for the following: 400, 401, 403, 404, 500.
You can find what these mean at second post.

10.4.1 400 Bad Request
10.4.2 401 Unauthorized
10.4.4 403 Forbidden
10.4.5 404 Not Found
10.5.1 500 Internal Server Error

Now, we simply create a file .htaccess (I have uploaded it in a .zip since Windows can not create one by default.

Now, open it up and enter the following lines:

Changing the domain and the error.php to what you what your domain is.

Now simply upload it to your host, and now when someone visits a page that cannot be found for example (404) they will get the error page you created!

Neat huh!

Comments and questions are welcome.

10.4.1 400 Bad Request

The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

10.4.2 401 Unauthorized

The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. HTTP access authentication is explained in "HTTP Authentication: Basic and Digest Access Authentication"

10.4.4 403 Forbidden

The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead.

10.4.5 404 Not Found

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

10.5.1 500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.



Please note, I posted this on another forum I visit.
Josh is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 01-26-2007, 04:18 AM   #2 (permalink)
Tomar
Senior Member
 
Join Date: Dec 2006
Posts: 314
DN$: 102
Tomar is on a distinguished road
Default

Thats nice tips It means we can redirect that pares to create by us.
thanks!
Tomar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-16-2007, 01:12 AM   #3 (permalink)
nick_mayhem
Junior Member
 
Join Date: Jan 2007
Posts: 3
DN$: 20
nick_mayhem is on a distinguished road
Default

I saw one online error pages creator. Forgot the link but you can google it and it was really nice one.
__________________
Nameslot.com - Buy, Sell & Talk Domains << Domain Forum
Ruuz.com << Web Directory | Travels Directory << Travels Directory
Hot Appz << Software Downloads
nick_mayhem is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On



All times are GMT -5. The time now is 02:13 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
Inactive Reminders By Mished.co.uk and FTP-Anime.com