Home | Site Map           
   
     

.htaccess to Mask Errors on Your Website


The .htaccess file is a control file located in your webservers directory. This file is a very powerful file that can control access to certain files, restrict access to files, forward people in the event of errors, and many more useful features for webmasters!

One of the most embarrassing things for a webmaster is to have a website with dead links, bad URLs, and error messages when the user surfs through your website. Using the .htaccess file you can help reduce how noticeable those errors are by quickly moving the user to a correct working location. This method of course doesn't correct the underlying problem with your website, however it does help to keep your website looking more professional.

Common error codes that you want to try to hide from the user:

400 - Bad Request
401 - Authorization Required
403 - Forbidden
404 - Page Not Found
500 - Internal Server Error
501 - Not Implemented

The biggest and most common error by far is the 404 Error (Page not found), but all of these can be embarrassing and troublesome to webmasters. If an error occurs on your website you don't want to lose that user. You may not be able to provide them with a link to the page they wanted, but you might get another chance if you redirect them to another page within your website.

Syntax for .htaccess file:

ErrorDocument ### index.php -- Example of format
ErrorDocument 404 /index.php -- Working example

In the second example, should a user request a page that no longer exists on your website, they will automatically have the index.php file loaded. This can be done for all of the error codes listed above and will help to hide and glaring mistakes in your website.

As I mentioned before, this is not a fix action for your website, but simply a mask. It's very important to review your website logs and look for error codes. The goal is to have a good working website afterall!

Ken Dennis
http://KenDennis-RSS.homeip.net/


MORE RESOURCES:

website design - Yahoo! News Search Results
website design - Yahoo! News Search Results

Medical Website Design and Medical Marketing Powerhouse, Aurora Information T...
COLD SPRING, N.Y., Feb. 7, 2012 /PRNewswire/ -- Building on its solid foundation in medical website design and medical marketing , Aurora Information Technology, Inc. (Aurora IT) receives accolades from ...
Fort Lauderdale Website Design Company, A Work Of Art, Inc., Gives Tips for B...
A Work Of Art, Inc., a Fort Lauderdale website design and marketing company, provide tips why business owners need to hire a web design company who can provide them with the services needed to make their website effective in today's competitive environment and the costs associated with web design. (PRWeb February 07, 2012) Read the full story at http://www.prweb.com/releases/websitedesigncost ...
How Pinterest Is Changing Website Design Forever
Even if you haven't ever visited popular visual bookmarking site Pinterest, you might recognize its design elements -- which have been popping up everywhere since the startup burst onto the mainstream scene in 2011.
Elliottsweb, a Chicago Website Design Company, Welcomes Its Newest Internet M...
CHICAGO, IL-- - Elliottsweb, a Chicago website design company, would like to kindly welcome its newest website design and search engine optimization clients:Kurt Hermanni is an experienced Miami immigration ...
IV Interactive Wins IMA ?Best in Class? Award for Website Design of Fertility...
Award Recognizes Creativity and Leadership in Healthcare MarketingNew York, NY (PRWEB) February 07, 2012 IV Interactive received the ?Best in Class? award for the design and implementation of FertilitySolutionsNE.com from Interactive Media Awards (IMA). An internationally renowned competition, IMA evaluates websites for design, content, functionality, standards compliance and usability. Winners ...

 

 

Web Design | Photo Blog
Copyright © 2008 All Rights Reserved WebDesignPort.com