.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


Tips on How to Design a Great Site

Have you ever walked pass a shop that, for some... Read More

Converting Print Advertising For Use On The Web - A How-To

Contrary to the beliefs of some, advertising for web and... Read More

Website Design - Choosing Your Colors Wisely

Colors convey emotions and emotions heavily influence the decision-making process.... Read More

Revising Your Site - What Happened To My Search Engine Placement?

As of September, Smartads went through what so many have... Read More

Alternative to Web Site Templates and Design Software

Before I discovered the concept of Web site templates, I... Read More

Design With Purpose

If your website is falling through the cracks, the chances... Read More

How To Use Color Effectively When You Create A Web Site

Colors are powerful, and create strong feelings. They can also... Read More

Questions to Ask When Designing a Website for Clients

Questions to ask when designing a Web Site for your... Read More

What Content to Publish on Your Website

Many businesses want a simple website where they tell people... Read More

How to Test Your Web Headlines and Web Site Home Page to Sell More Products and Services

A client asked me, at what point do you change... Read More

Plugging the Dreaded World Wide Web Black Hole is Just the First Step

You have created your custom error page so now all... Read More

Give Your Website A Chance

I often wonder how serious people are when it comes... Read More

What Does Your Website Say About Your Business?

QUESTION: My business is very small, just me and... Read More

Digitalize It! : (Modification of images with tools such as Adobe CS and Corel)

Then it was a choice among crayons, paints and palettes... Read More

How To Rescue Your Graphic Design Project When All Else Fails

Whether you're giving a critical sales presentation to a client,... Read More

Has Your Design Firm Run Amuck With Your Web Site?

What's happening to good web site design? Somehow we creative... Read More

The Seven Deadly Sins of Web Business Design

Before you take a road trip it is usually a... Read More

Web Site Accessibility

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

Choosing the Right Web Designer

Creating your web site can be a tricky process. Choosing... Read More

Web Templates: Replacing Designers?

I've seen articles (and websites) that suggest you can buy... Read More

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

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

Making Good Websites that Stand Out

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

So Much About META Tags!

I've written about META tags in the past, and I... Read More

Elements of Graphic Design for Your Website

We've all seen them. Poorly designed web sites that make... Read More

Transforming A Site From Good To Excellent

One of the challenges of moving a web site up... Read More

How to Make the Online Sales Copy for Your Website More Conversational

It has been said that the best online sales copy... Read More

Becoming A Website Designer

The ability to create simple, attractive and functional web pages... Read More

Why Stock Photography is a Great Resource for Web Business

A picture is worth a thousand words.And it still is... Read More

An Ideal Home Business Home Page

From my personal experience of around two year as home... Read More

Sell Yourself First...Your Key To More Sales

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

Mini Site or Content-based Web Site?

Are you in a dilemma whether to create a mini... Read More

Creating Personal Web Sites (Part 2)

This is the second part of a two-part article about... Read More

How Does Your Website Measure Up?

Does your website make a good first impression? Is the... Read More