.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/

In The News:


pen paper and inkwell


cat break through


My Top Ten List Of Extremely Annoying Web Page Design Elements!

Easy navigation and usability are one of the most important... Read More

Browser Compatibility

Internet Explorer, created by microsoft has been the most popular... Read More

User Experience and Search Engines: If Your Home Page Could Only Talk

Dear web site visitor.I can't tell you how glad I... Read More

14 Ways to Add Content to Your Web Site - Part 2

7. Create high quality content - make clear points with... Read More

3 Tips For Writing Content That Will Make You Sales

Content is king. Without content your website is an empty... Read More

How Your Business Can Win Online

There are lots of websites out there that do little... Read More

Why Dot-Coms Fail - a Webmasters Perspective

Everyday we hear that another company goes out of business.When... Read More

How To Choose A Website Designer

Now that you have decided that it is time to... Read More

You Too Can Have Fun With Sepia Images!

If you are one of those who wonder how people... Read More

Building Web Sites Using Web Templates

Gone are the days when you had to rely on... Read More

Nine Effective Tips For Improving Your Website?s Usability

Web usability is perhaps the most important factor in any... Read More

To Flash, or Not to Flash

When considering whether or not to incorporate Flash into your... Read More

Making Good Websites that Stand Out

Websites, there's literally billions of them out there in cyber-space.... Read More

Web Site Professionalism? What Is It?

Your web site should be-visitor friendly to navigatesearch engine friendly... Read More

How to Use Sliced Graphics to Layout Your Web Site

The problem with designing your site as a graphic, is... Read More

Ten Tips For Your Web Site Home Page

1. Loading time:try to be below 20kbless number of imagesspecify... Read More

Custom Website Design - 7 Steps to a More Professional Website

If you are trying to sell a product or service... Read More

Cheap Web Design In London

Due to the large number of people offering web design... Read More

How To Design Your Web Site With CSS

Cascading Style Sheets (CSS) allows you to create fast loading... Read More

Understand Your Color

Any design on a web application involves the effective input... Read More

How to Convince Your Visitors to Return Often

One visit does not make a sale. Be sure to... Read More

Drupal Modules

There are plenty of Drupal Modules that you can install... Read More

How To Create A Professional Website In Less Than A Week

Here's a really simple way... any novice can create a... Read More

Essential Strategies To Make Your Web Copy Attractive To Your Target Audience

Reading on the web is different than reading in all... Read More

Web Site Redirection - How to Implement a 301 Redirect

You just created a new web site but want to... Read More

6 Design Flaws Newbie Web Designers Make: Fool Everyone Into Thinking You Know What Youre Doing

Even if you're not an accomplished webmaster you can still... Read More

Color Scheme for Your Website?

Yes, in a world that is obsessed with makeover madness,... Read More

How to Find Inexpensive Web Design

Web design is a very competitive area and there is... Read More

Why is a Logo so Important to Your Business?

Well, a logo for your business. Why is it important?... Read More

How To Write An Effective FAQ Page

Websites that have multiple pages usually have a Frequently Asked... Read More

Winning Websites

Customers will form an opinion of your business as soon... Read More

Web Design: How To Get Your Visitors To Stay

Remember the famous line from the movie Field of Dreams,... Read More

Using Server Side Includes to Simplify Your Web Design

An "include" file is a piece of code that can... Read More