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/
This is the second part of a two-part article about... Read More
Your web site is like your car. Both are significant... Read More
So, what's in a website design anyway? And, how do... Read More
Here's the single most important part of your website: YOUR... Read More
I see a lot of mistakes, but here are the... Read More
I am constantly bombarded with all sorts of advertisements, single-page... Read More
Making a successful online business can be a long and... Read More
Countdown to Armageddon - at least you'd think so judging... Read More
Web site design has certainly, in the past decade, evolved... Read More
We would all like to have the best looking website,... Read More
QUESTION: We promote our web site in all our... Read More
Home PageHome page should clearly indicate what the site is... Read More
See, works every time. Seriously now, for some reason people... Read More
Getting traffic to your website is not the only factor... Read More
The first immutable law of effective navigation: It's gotta be... Read More
When your company built its website, did you think about... Read More
Colors have long been known to have psychological affects on... Read More
It's been said again and again, when it comes to... Read More
Any design on a web application involves the effective input... Read More
When a prospect lands on your website will he or... Read More
Due to the large number of people offering website design... Read More
We've all seen and read product testimonials. They're a very... Read More
If one more business owner tells me their website sucks... Read More
Read the title of this article over a couple of... Read More
All websites have a homepage. It is the most important... Read More
premium house cleaning Glenview ..Many Internet sites that try to sell you something have... Read More
What's happening to good web site design? Somehow we creative... Read More
Web Site Awards are given from other sites to reward... Read More
The way you design your web site affects your visitors'... Read More
Most web designers and web design companies will try to... Read More
The first immutable law of effective navigation: It's gotta be... Read More
Mechanical spiders have to eat. In fact, they usually have... Read More
If you've a website but not making a lot of... Read More
When you develop a sales brochure, you have a mental... Read More
If someone doesn't know you personally, will they trust you... Read More
When you begin the design of your Web site, one... Read More
Page ranking by search engines such as Google are not... Read More
Typos, misspellings, hideous grammar, exclamation overkill and run-on sentences all... Read More
The Internet has seen an explosion in so called 'lance'... Read More
The question that I most frequently hear from people is... Read More
Owning your own website is a must if you are... Read More
If one more business owner tells me their website sucks... Read More
1. Repackage your web site content in to different products... Read More
Novice and professional designers alike ? you may probably be... Read More
Setting up a survey on your site is extremely simple... Read More
See, works every time. Seriously now, for some reason people... Read More
With so many different configurations internet users have their computers... Read More
Most NGOs (Non-Governmental Organizations) don't understand these important aspects of... Read More
It's a fact, Page Not Found, known as a 404... Read More
In this article we will be looking at why you... Read More
Web Design |