Htaccess Tutorials: guides, examples, tips and tricks for htaccess

Home

What is an .htaccess file?

.htaccess file is a text file which is uploaded to your web site. The web server detects this file and checks for instructions every time access to any file or directory on your website happens.
The file can change settings and allows you to control many things on the server.
You can protect directories with passwords, create customized 404 errors, url redirects, change default pages etc.

An example

The following example will change the default page to home.html from index.html which is set by the server.

DirectoryIndex home.html