Htaccess file

On Unix servers, the .htaccess file is a way to customize the environment of your web site. The most well known customization is to restrict access of a directory to one or more people, but there are actually many other things that you can do.

The .htaccess and .htpasswd files work in a tree fashion. Assume you set up your directories as follows.

mydir
mydir\subdir1
mydir\subdir2
mydir\subdir3\bottomdir
mydir\subdir4

If you put a .htaccess file in "mydir" it will apply on all lower directories, unless overridden by a .htaccess file. In this example, you could put a .htaccess file in "subdir4". This file will apply only to "subdir4" and no others. If you put one in "subdir3" it would also apply to  the lower level directory "bottomdir".

Additionally, understand that these files apply to entire directories, not individual files.

 

Rate this Script @ The CGI Resource Index!

Script Rating:

 

 

Internet Tips Contents
404 Errors Advertising Autoresponse Awardmaster Basics Browsers Careers Chatting Disasters Domains Email Emoticons Ezines Free Stuff Fun Stuff FTP Graphics Homepages HTML Reference HTML Tutorial Interactive Legal Links Msg Boards Microsoft Money Multimedia Networks Newsgroups Newsletter Products RFC's Ringmaster Searches Security Sticky Sites Surfing TANSTAAFL Telnet Viral Webmaster Your System