Common Usage
- Authorization, authentication
- A .htaccess file is often used to specify security restrictions for a directory, hence the filename "access". The .htaccess file is often accompanied by a .htpasswd file which stores valid usernames and their passwords.
- Rewriting URLs
- Servers often use .htaccess to rewrite long, overly comprehensive URLs to shorter and more memorable ones.
- Blocking
- Use allow/deny to block users by IP address or domain. Also, use to block bad bots, rippers and referrers. Often used to restrict access by Search Engine spiders
- SSI
- Enable server-side includes.
- Directory listing
- Control how the server will react when no specific web page is specified.
- Customized error responses
- Changing the page that is shown when a server-side error occurs, for example HTTP 404 Not Found or, to indicate to a search engine that a page has moved, HTTP 301 Moved Permanently.
- MIME types
- Instruct the server how to treat different varying file types.
- Cache Control
- .htaccess files allow a server to control caching by web browsers and proxies to reduce bandwidth usage, server load, and perceived lag.
Read more about this topic: .htaccess
Famous quotes containing the words common usage, common and/or usage:
“The inspired scribbler always has the gift for gossip in our common usage ... he or she can always inspire the commonplace with an uncommon flavor, and transform trivialities by some original grace or sympathy or humor or affection.”
—Elizabeth Drew (18871965)
“There is a plain distinction to be made betwixt pleasure and happiness. For tho there can be no happiness without pleasureyet the converse of the proposition will not hold true.We are so made, that from the common gratifications of our appetites, and the impressions of a thousand objects, we snatch the one, like a transient gleam, without being suffered to taste the other.”
—Laurence Sterne (17131768)
“Pythagoras, Locke, Socratesbut pages
Might be filled up, as vainly as before,
With the sad usage of all sorts of sages,
Who in his life-time, each was deemed a bore!
The loftiest minds outrun their tardy ages.”
—George Gordon Noel Byron (17881824)