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/
![]() |
|
![]() |
|
![]() |
|
![]() |
Have you ever walked pass a shop that, for some... Read More
Contrary to the beliefs of some, advertising for web and... Read More
Colors convey emotions and emotions heavily influence the decision-making process.... Read More
As of September, Smartads went through what so many have... Read More
Before I discovered the concept of Web site templates, I... Read More
If your website is falling through the cracks, the chances... Read More
Colors are powerful, and create strong feelings. They can also... Read More
Questions to ask when designing a Web Site for your... Read More
Many businesses want a simple website where they tell people... Read More
A client asked me, at what point do you change... Read More
You have created your custom error page so now all... Read More
I often wonder how serious people are when it comes... Read More
QUESTION: My business is very small, just me and... Read More
Then it was a choice among crayons, paints and palettes... Read More
Whether you're giving a critical sales presentation to a client,... Read More
What's happening to good web site design? Somehow we creative... Read More
Before you take a road trip it is usually a... Read More
Making your site accessible means making it available to be... Read More
Creating your web site can be a tricky process. Choosing... Read More
I've seen articles (and websites) that suggest you can buy... Read More
Easy navigation and usability are one of the most important... Read More
Websites, there's literally billions of them out there in cyber-space.... Read More
I've written about META tags in the past, and I... Read More
We've all seen them. Poorly designed web sites that make... Read More
One of the challenges of moving a web site up... Read More
It has been said that the best online sales copy... Read More
The ability to create simple, attractive and functional web pages... Read More
A picture is worth a thousand words.And it still is... Read More
From my personal experience of around two year as home... Read More
Selling on the internet is a challenge. There is no... Read More
Are you in a dilemma whether to create a mini... Read More
This is the second part of a two-part article about... Read More
Does your website make a good first impression? Is the... Read More
Cascading Style Sheets (CSS) allows you to create fast loading... Read More
Surfing the internet is basically an information-fest! From intellectual discussions... Read More
They may look cutting edge, but if you want a... Read More
CSS or Cascading Style Sheets has opened up tremendous possibilities... Read More
Then it was a choice among crayons, paints and palettes... Read More
When considering whether or not to incorporate Flash into your... Read More
You spend time and money promoting your website; but what... Read More
1. Lack of overall strategy and clear definition of success:Most... Read More
Creating a web site takes thought, planning and execution. Unfortunately,... Read More
Want to see an excellently constructed website? As a writer... Read More
(Making Your Graphics Work For You)It's no secret that a... Read More
No question about it, web design is an art. Finding... Read More
If you have a web site to which people pay... Read More
I can't figure out people who have products or information... Read More
Let's face it; the line from A Field of Dreams... Read More
Remember the famous line from the movie Field of Dreams,... Read More
Well, a logo for your business. Why is it important?... Read More
I see a lot of mistakes, but here are the... Read More
What dollar amount does your web site contribute to this... Read More
Your web site should always adhere to standards!A professional web... Read More
Choosing the right typeface for your website copy is important,... Read More
The trend today to overuse animation in a website's opening... Read More
Even if you're not an accomplished webmaster you can still... Read More
Easy That's how you'd like life to be, right? Especially... Read More
We've all read the countless publications about effective web site... Read More
Q: Should I build and maintain my business Web site... Read More
First impressions are extremely important if you hope to do... Read More
This is the second part of a two-part article about... Read More
The first immutable law of effective navigation: It's gotta be... Read More
Easy navigation and usability are one of the most important... Read More
Novice and professional designers alike ? you may probably be... Read More
An ongoing challenge for webmasters today is to provide fresh... Read More
The internet continues to grow and has become the default... Read More
Web Design |