.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


Create Favorite Icon

Favorite icon appears to the left of your link in... Read More

Get FASTER Download Times By Making BIGGER Web Pages!

As a webmaster you already know how important it is... Read More

Building An Effective Furniture Sales Web Site

Web sites that feature products ? especially furniture or other... Read More

Design vs Content: Who is KING?

Well it is not Elvis, that's for sure.I am a... Read More

Creating Personal Web Sites

This is a two-part article about creating a web site... 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

How to Design Website Which Google Likes

Are you going to design or redesign new website or... Read More

15 Website Elements That Attract Visitors

Here is a quick list of components that make a... Read More

Got Web Traffic but Still Low Sales? Ten Ways to Selling Success - Part 2

Part one of this article is available at ... Read More

Make it Clear What Your Website is About

Just about every list of the "Top 10 Web Design... Read More

Choosing Form Over Function Kills Your Site

Never put form over function. Why? Because it's crucial that... Read More

Top Ten Ways to Use Audio on Your Site

Audio can provide an added dimension to your site. It... Read More

Concentrate On Web Content Instead Of Search Engine Optimization

For many webmasters the title of my article may seem... Read More

Awards Program Debate

Daily article:One of the most debated subject among webmasters is... Read More

Using CCS to Eliminate Tables

CSS or Cascading Style Sheets has opened up tremendous possibilities... Read More

Build A Successful Website For Dummies

So you want to build a website here I will... Read More

10 Web Site Design And Writing No-Nos

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

Web Site Design Mistakes ? Database Parameters In URLs

Creating a web site takes thought, planning and execution. Unfortunately,... Read More

Fast Web Design For The Skint Webmaster

About two years ago, I had a go at commercial... Read More

Custom Icons For Your Specific Brand

Developing a software application is not easy at all; apart... Read More

How To Boost Your Sales Dramatically Using Dynamic Back-end Strategies

Getting a customer is not easy.Getting a visitor to decide... Read More

Effective Website Design For Massive Traffic

STEP 1:Do your homeworkPlan and think about your content. Think... Read More

Tried and Tested Tips to Improve Your Website - Part 1

1. DO NOT use excessive graphics or banner images on... Read More

8 Tips for Designing a Great Website

Square buttons, round buttons, flashy buttons ? will they match... Read More

Nine Effective Tips For Improving Your Website?s Usability

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

Looking For A Designer To Re-Design Your Website?

If you were like me and you have just started... Read More

Maximising Web Site Viewability - Browsers

With so many different configurations internet users have their computers... Read More

What I Look For In a Website

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

Web Usability: The Basics

What is web usability & why is it important?Web usability... Read More

Increase Sales on Your Website! Use Graphics!

How many times have you clicked on a website only... Read More

Click Here

See, works every time. Seriously now, for some reason people... Read More

The Top 8 Website Sins Part Two

Sin #5Poor Spelling And GrammarWe all make mistakes when we... 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