.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


If Content is King who is Queen?

It's been said again and again, when it comes to... Read More

Usability and Considerate Design

I hate to imagine that in your web development project... Read More

A Website Checklist

If you've just finished building your new website (or revamping... 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

Quality Website Design At An Affordable Price

I always have people asking me if I know of... Read More

Make Your Web Site User-Friendly

You can create a website that attracts customers, not repels... Read More

Moving Things Around

How often, men, have you come home to find the... Read More

Turn Harmful 404 Error Pages Into Helpful 301 Redirects

It's a fact, Page Not Found, known as a 404... Read More

Your Website Hurts My Eyes: 7 Reasons to Tone Down Your Advertising

So you're on the computer, as usual. Your eyes are... Read More

Web Design: How To Get Your Visitors To Stay

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

Congratulations! You?ve Gotten Visitors To Your Site! Now, Can They Find What Theyre Looking For?

As search engine marketers, we spend an enormous amount of... Read More

Increase Your Credibility With Web Site Awards

Web Site Awards are given from other sites to reward... Read More

The Golden Rule Of Website Building

Copyright 2005 Robert EvansSetting yourself up to earn a steady... Read More

Web Site Accessibility

Making your site accessible means making it available to be... Read More

The Next Marketing Tool: Deisgn

Design sells. It's something that all of us know, but... Read More

No More Jargon! Pamper Your Audience!

When your company built its website, did you think about... Read More

Bad Web Design: ActiveX

ActiveX uses an interesting method for enforcing security ... it... Read More

What to Avoid to Make Your Website Design Effective

The effective design is this one, which is maximum simplified,... Read More

How to Double Your Online Sales Without Spending Another Dime on Advertising

Learning how to convert visitors to your web site into... Read More

Website Design: 10 Web Site Design Pitfalls To Avoid

If you've a website that is not generating a lot... Read More

Basic Graphic Design

Wether you design your business brochures, flyers, web page, or... Read More

Successful Websites Don?t Set Out To Sell

What are websites? Are they sales tools for vendors and... Read More

10 Web Site Design And Writing No-Nos

1. Don't load your web site with a lot of... Read More

7 Reasons Why Using CSS is a Must

CSS is a new option for website designers that have... Read More

Sell Yourself First...Your Key To More Sales

Selling on the internet is a challenge. There is no... Read More

Website Design Mishaps - How to Avoid Costly Errors That Can Crush Your Chances of Success

Designing your website can be a difficult task especially if... Read More

The Key to Getting More Magic Shows Booked Online

This article is the result of a conversation I had... Read More

Developing An Effective Physical Therapy Web Site

Physical therapists have unique web presence needs. An effective site... Read More

How to Create a Favicon for Your Web Site

One of the simplest things you can do to give... Read More

How to Avoid the Biggest Mistakes Member Sites Make in Their Marketing Copy

If you have a web site to which people pay... Read More

Web Advertising: 10 Little Known Tricks To Help Convert Your Traffics To Buying Customers

You may not believe it, but people still judge things... Read More

Online Businesses Still Ignoring Dial-up Market

In this article you will find the parallel between two... Read More

10 Tips for Killer Website Design

Does website design make a difference in how long people... Read More