PC.netPC.net

.htaccess

File Type Apache HTACCESS File IconApache HTACCESS File
File Format Standard
Usage Referenced by an application; not meant to be opened manually
Rank ★ ★ ★  Common
Description

Configuration file used by an Apache Web server that provides instructions for different directories of a website; "htaccess" is short for HTTP access, which is the protocol used for transmitting Web pages.

The .htaccess file can used to perform several important functions such as:

  • Define the index page of a directory (i.e. "index.html" or "index.php")
  • Specify the 404 (Page not found) error page
  • Perform 301 or 302 page redirects
  • Deny access from specific IP address or other websites
  • Restrict access to certain directories and pages
  • Execute MOD_REWRITE instructions
The .htaccess file is always named ".htaccess" and does not include a filename before the dot. It is placed in the root directory of a website and is processed by the Web server each time a Web page is accessed.

The Apache .htaccess Tutorial includes additional information about how and when to use .htaccess files.

Open With
Windows

IconApache Web server

IconMicrosoft Notepad

IconOther text editor

Macintosh

IconApache Web Server

IconMacRabbit Espresso

IconMacroMates TextMate

Unix

IconApache Web server

IconVi

IconOther text editor

Updated 2007
space