<< Back to Index Step 4: Robots & .htaccess Files [continued]
.htaccess File
You may think you have a fair idea of what can be done with an .htaccess file. You are more than likely mistaken. Even if you have never heard of the .htaccess file and what it can do for you, the intention of this tutorial is to get you moving in teh right direction.
.htaccess files allow you, for example, to implement custom error pages or password protect directories. But there is much more available to you through this marvelously simple .htaccess file.
A Few General Ideas on .htaccess Files
An .htaccess file is a simple ASCII file such as you would create through a text editor like NotePad or SimpleText .
The naming of the .htaccess file is ".htaccess"; it is a file extension. It is not "file.htaccess" or "something.htaccess" - it is simply and only named " .htaccess "
The most common uses for .htaccess is as an error handler. If someone mistypes a page to your site, or you have simply deleted a page, then the .htaccess file will redirect the traffic for you.
ErrorDocument 400 /errors/badrequest.html
ErrorDocument 401 /errors/authreqd.html
ErrorDocument 403 /errors/forbid.html
ErrorDocument 404 /errors/notfound.html
ErrorDocument 500 /errors/serverr.html
This enables the surfer to bypass seeing the Standard Error Page and be seamlessly redirected to a page on your site so their visit is uninterrupted.
A comprehensive guide to .htaccess
http://www.javascriptkit.com/howto/htaccess.shtml

<< Back | Next >> |