Monday, December 15, 2008

What is a htaccess file

Essentially a .htaccess file allows you to override the web server server configuration on an individual directory basis. In fact, it's commonly known as a "directory level configuration file".

In a shared hosting environment this means that the individual site owner can alter the servers configuration for their site without effecting any other sites.

Some common uses for the .htaccess file include:
  • rewriting URLs (ie. changing dynamic URLs such as www.mydomain.com/page.php?id=1 to a "friendly" URL such as www.mydomain.com/about
  • implementing authorization control (ie. prompt for username and password, or even block/allow certain IP addresses)
  • customized error pages, such as changing what is displayed when you get a file not found (404) error
This site will be providing lots of tricks and tips on utilizing the power of your .htaccess file

No comments:

Post a Comment