Web Hosting Help - Unix and Linux Web Hosting
You're currently browsing the answers and replies to a question asked related to unix and linux web hosting. If you wish to post a better answer or share greater insight into this question, feel free to post it.
Posted On: Tue 25 May, 2004
Asked By: Anonymous |
What is an .htaccess file and what does it do? |
Posted On: Tue 25 May, 2004
Answered By: Anonymous |
| An .htaccess file is a text file used by Apache that contains customized directives. These directives allow web masters to extend the capabilities of the web server that normal HTML functions cannot do. For example, an .htaccess file can be used to handle error documents, password protect directories, deny users from viewing web pages, prevent hot linking of images, and redirecting pages (using regular expressions).
The .htaccess file is can be put into action by uploading it into the directory and is recursive, meaning, it will affect directories below the one the file is in – unless it has its own .htaccess file.
Lastly, you do not need any special programs to create an .htaccess file since any text editor, including, Microsoft Notepad or PICO can create and edit the file. The file must be uploaded to the web server in ASCII mode and given permissions 664 (RW-R--R--). This makes the file usable by the Apache server, but prevents it from being read by a web browser, which can seriously compromise your security.
|
Do you have an answer or something to share as well regarding this question?
|