![]() |
|
|
|
#1 (permalink) |
|
Junior Member
Join Date: Jan 2007
Posts: 10
DN$: 24
![]() |
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: Code:
ErrorDocument 400 http://www.domain.com/error.php ErrorDocument 401 http://www.domain.com/error.php ErrorDocument 403 http://www.domain.com/error.php ErrorDocument 404 http://www.domain.com/error.php ErrorDocument 500 http://www.domain.com/error.php 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. |
|
|
|
| Sponsored Links |
|
|
#3 (permalink) |
|
Junior Member
Join Date: Jan 2007
Posts: 3
DN$: 20
![]() |
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 |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|