.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


What Your Website REALLY Says About You And Why It Matters

Everything you say and do says something about you. This... Read More

Website Polls For You And Your Visitors

Setting up a survey on your site is extremely simple... Read More

7 Ways of Building Customers Trust With Your Web Site

When I purchase something from a web site I first... Read More

Why Ugly Sites Sell More Than Pretty Ones

What the heck is going on lately? Most internet websites... Read More

How Do You Make A Website?

No, that's not the real question. The real question is... Read More

Simplify Your Web Site for Clarity and Ease of Use

There are plenty of web sites out there in which... Read More

Seven Habits of Highly Effective Webmasters

A highly effective website will always reflect its highly effective... Read More

Use Feng Shui Techniques To Design a Harmonic Website For Your Business

By following feng shui guidelines and techniques, you can build... Read More

The Monster Garage of eLearning

Have you seen Jesse James on the... Read More

Teach Yourself CSS The Easy Way

I taught myself HTML back in the mid-nineties and was... Read More

Sell Yourself First...Your Key To More Sales

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

Web Production And Design Tips

You have identified that to have an internet prescence would... Read More

Graphic Terms- The Basics Part I

You're almost set. The content of your website, e-book, or... Read More

Make Artistic Graphic Designs

Are you a student of graphic design? If you have... Read More

Why You Want to Include an FAQ In Your Site

Congratulations! You've got a brand new site and it's doing... Read More

What I Look For In a Website

As my occupation is that of a proofreader, one of... Read More

What Drives Repeat Visitors To Your Site?

There can be zillions of reasons why your visitors return... Read More

Designing Professional Web Pages

If your Web site doesn't project a professional and polished... Read More

How To Design A Web Site

I'm not a professional web site designer and openly admit... Read More

Is a Web Site Builder Right for You?

A web site builder can be a real life saver... Read More

How To Write An Effective FAQ Page

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

Hiring a Graphic Designer

You've come up with a great product. You've got the... Read More

The Secret To A Profitable Website

Whether you are planning on having a website built for... Read More

Ten Tips For Your Web Site Home Page

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

No More Jargon! Pamper Your Audience!

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

Images: How To Make Them To Load Fast On Your Web Pages?

1. Use .gifs rather than .jpgs. GIFs are smaller in... Read More

Basic Graphic Design

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

Cheap Web Design In London

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

How to Find Inexpensive Web Design

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

Give Your Web Site a Small Business Marketing Tune Up

Your web site is like your car. Both are significant... Read More

Leave Those Links Blue!

Don't mess with those links! When you're designing your site,... Read More

6 Reasons Why Web Templates Are Todays Trend

As the Internet blooms at an alarming rate, so as... Read More

How To Increase Your Conversion Rate or What Most People Miss When It Comes To Optimization

Everybody talks about the importance of testing your sales copy... Read More