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/
Effective navigation stands out. It's clear, obvious, and highly visible.You'll... Read More
You have created your custom error page so now all... Read More
Most websites use similar fonts and as a result have... Read More
You have only 10 seconds to impress your potential buyer.... Read More
Most of us know that we need to advertise our... Read More
The "Wow" factor that accompanied the introduction of streaming media... Read More
If your are a new web designer, you may face... Read More
No, that's not the real question. The real question is... Read More
I have written before about long sales copy on the... Read More
When your company built its website, did you think about... Read More
You've likely heard of the movie, Jerry Maguire, with its... Read More
Websites, there are literally billions of them out there in... Read More
Your web site is the key to your success on... Read More
I want you to imagine a lemon. In your mind's... Read More
Writing for your web site is not the same as... Read More
Choosing the right typeface for your website copy is important,... Read More
Traffic to a site can be a blessing or a... Read More
When building your website you might not have a large... Read More
Over the course of the last decade, the Internet has... Read More
This article may come as a surprise to you.Especially since... Read More
Website design firms come in all shapes and sizes.When choosing... Read More
If you are familiar with my work, then you have... Read More
As the Internet blooms at an alarming rate, so as... Read More
Even if you're not an accomplished webmaster you can still... Read More
Does your website need a re-design? Here are some questions... Read More
licensed cleaning services Park Ridge ..For many webmasters the title of my article may seem... Read More
So you need a website. You are not sure if... Read More
1. Repackage your web site content in to different products... Read More
Colors convey emotions and emotions heavily influence the decision-making process.... Read More
There's no doubt about it - the first page your... Read More
Building a website can be overwhelming, here are some design... Read More
Wether you design your business brochures, flyers, web page, or... Read More
Do you want to use unsafe web colors without offending... Read More
Nope. You certainly don't need a website.But you don't need... Read More
It's been said again and again, when it comes to... Read More
When your web site sells more than a dozen items,... Read More
Geared Up with a website and lots of energy to... Read More
You're almost set. The content of your website, e-book, or... Read More
Graphics are fun, but if you put in too many... Read More
The Internet is a relatively new medium. What works for... Read More
Geometric designs come in all shapes and sizes? and lines.... Read More
Web usability is perhaps the most important factor in any... Read More
There are often many mistakes encountered when creating a webpage... Read More
Mechanical spiders have to eat. In fact, they usually have... Read More
1. Loading time:try to be below 20kbless number of imagesspecify... Read More
Web advertising has taken many forms, including those that appear... Read More
Daily article:One of the most debated subject among webmasters is... Read More
Traffic to a site can be a blessing or a... Read More
The "Wow" factor that accompanied the introduction of streaming media... Read More
If someone doesn't know you personally, will they trust you... Read More
Web Design |