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/
![]() |
|
![]() |
|
![]() |
|
![]() |
Everything you say and do says something about you. This... Read More
Setting up a survey on your site is extremely simple... Read More
When I purchase something from a web site I first... Read More
What the heck is going on lately? Most internet websites... Read More
No, that's not the real question. The real question is... Read More
There are plenty of web sites out there in which... Read More
A highly effective website will always reflect its highly effective... Read More
By following feng shui guidelines and techniques, you can build... Read More
Have you seen Jesse James on the... Read More
I taught myself HTML back in the mid-nineties and was... Read More
Selling on the internet is a challenge. There is no... Read More
You have identified that to have an internet prescence would... Read More
You're almost set. The content of your website, e-book, or... Read More
Are you a student of graphic design? If you have... Read More
Congratulations! You've got a brand new site and it's doing... Read More
As my occupation is that of a proofreader, one of... Read More
There can be zillions of reasons why your visitors return... Read More
If your Web site doesn't project a professional and polished... Read More
I'm not a professional web site designer and openly admit... Read More
A web site builder can be a real life saver... Read More
Websites that have multiple pages usually have a Frequently Asked... Read More
You've come up with a great product. You've got the... Read More
Whether you are planning on having a website built for... Read More
1. Loading time:try to be below 20kbless number of imagesspecify... Read More
When your company built its website, did you think about... Read More
1. Use .gifs rather than .jpgs. GIFs are smaller in... Read More
Wether you design your business brochures, flyers, web page, or... Read More
Due to the large number of people offering web design... Read More
Web design is a very competitive area and there is... Read More
Your web site is like your car. Both are significant... Read More
Don't mess with those links! When you're designing your site,... Read More
As the Internet blooms at an alarming rate, so as... Read More
Everybody talks about the importance of testing your sales copy... Read More
For most people graphic design does not come easy. Unfortunately... Read More
These days, it seems that everyone has a website. Unfortunately,... Read More
Argh, where's the contact button?! Believe it or not, some... Read More
In this article I will give advice and tips of... Read More
Conventional Wisdom states you should use Sub-Directories to organize your... Read More
One visit does not make a sale. Be sure to... Read More
Colors are powerful, and create strong feelings. They can also... Read More
Persons engaged in website design, here's a scoop for you!... Read More
There are six important characteristics that can play a major... Read More
1. Repackage your web site content in to different products... Read More
The internet is full of web design companies pleading for... Read More
You know... Before purchasing your product a person comes to... Read More
As an online Entrepreneur you require a successful website.One that... Read More
Many people hire professional web site designers for as much... Read More
Does your website make you any money? Does it SAVE... Read More
Owning your own website is a must if you are... Read More
With the advent of the Internet a whole new vista... Read More
Have you put a lot of effort, time, and money... Read More
The title tags of your web pages are more important... Read More
Developing a software application is not easy at all; apart... Read More
You've designed your logo, and you're ready to print your... Read More
What do the key words represent?Key words - these are... Read More
Do you have a website? If so, you need an... Read More
Unless you are an inventor, most likely you are selling... Read More
Remember your vision for your company and the brand or... Read More
The Internet is a relatively new medium. What works for... Read More
To build a website, there are four methods to choose... Read More
It has been said that the best online sales copy... Read More
Don't mess with those links! When you're designing your site,... Read More
When creating an e-cover the what's the first thought that... Read More
Making a successful online business can be a long and... Read More
Remember the day that you got your new computer (or... Read More
No question about it, web design is an art. Finding... Read More
Web Design |