Spiga

What is .htaccess file


What is .hatccess file

.htacess stands for HyperText Access file.This is the default name of configuration file in the server side.It can also be placed in the directory whose security we want as it provides the ability to customize configuration for requests to the particular directory.

Although .htaccess is only a file, it can change settings on the servers and allow you to do many different things, the most popular being able to have your own custom 404 error pages. .htaccess isn't difficult to use and is really just made up of a few simple instructions in a text file.

.htaccess files are often used to specify the security restrictions for the particular directory, hence the filename "access." The .htaccess file is often accompanied by an .htpasswd file which stores valid usernames and their passwords.

Use of .htaccess file

1)Authorization and Authentication.
.htaccess files are often used to specify the security restrictions for the particular directory, hence the filename "access." The .htaccess file is often accompanied by an .htpasswd file which stores valid usernames and their passwords.
2)Customized error responses
Changing the page that is shown when a server-side error occurs, for example HTTP 404 Not Found.
These are some of the most common errors:

401 - Authorization Required
400 - Bad request
403 - Forbidden
500 - Internal Server Error
404 - Wrong page
3)Cache Control
.htaccess files allow a server to control User agent caching used by web browsers to reduce bandwidth usage, server load, and perceived lag.
4)Rewriting URLs
Servers often use .htaccess to rewrite "ugly" URLs to shorter and prettier ones.

1 comments:

  Anonymous

February 20, 2009 at 3:35 AM

So much information about the web here. I thought getting online was hard, this article is packed with useful tips. Thanks for the post!