First of all I should clean some doubts out. The .htaccess is a simple ASCII text file. Its not an extension like .jpg, .txt or .html. The original is name just like that, starting with a period “.” its .htaccess.
The .htaccess file allows you to customize the way you want your site to behave. Its like if you place your .htaccess file in the root directory of your hosting it will behave for that specfic directory if you place in a sub folder like in rootdirectory/foldername/ it will behave for that “foldername” directory only.
If i’m not wrong it also lets you to allow the spiders to crawl which pages of the website. We’ll talk about it in detail later on.
What can We do with .htaccess ?
- Customize the looks or behavior of error pages (404) of our site.
- Protect our site with a Password Implementation.
- Enable server-side includes.
- Deny access to our site based on IP.
- Change our default directory page (index.html).
- Redirect visitors to another page.
- Prevent directory listing.
Mostly Whenever you buy a hosting .htaccess is already there automatically. Designers and Developers sometimes write there own .htaccess according to their neesds. You don’t need to be an expert or coder for writing a .htaccess.
A plain text editor that doesn’t use Word wrap can help you do your job. Some editors like MS Word insert special ASCII codes on line breaks for signification. Your file will not work if these special characters are in it. You can write .htaccess in your own Notepad but make sure Word wrap isn’t enabled.
We’ll discuss how to write .htaccess soon, stay tuned !
Feel free to ask questions, so I may explain them in the next .htaccess article.





March 30th, 2009 at 8:00 pm
Great post, very informative…
I didn’t have a clue what the .htaccess file was until I needed to edit it to be able to change my permalinks, and, if I’m honest I still wouldn’t know what to do to edit it beyond permalinks!
[Reply]
March 30th, 2009 at 8:13 pm
Glad you liked..
Its something a blogger should be aware of..
[Reply]