Web Server - .htaccess files - NaviCOPA

Top  Previous  Next

A .htaccess file placed in a directory will control access to that directory.


An internet search will provide extensive information on this subject.


NaviCOPA supports a number of commands in these files. Here is a typical .htaccess file with an explanation of each part:


AuthUserFile C:\Documents and Settings\All Users\Application Data\InterVations\NaviCopa\passwords\mydomain.psw
This line defines where to find the password file for this directory - you can store usernames/passwords for any number of directories in the same file if you wish, but note that they would all work with all directories that use this file.


NOTE that you must use the Password Generator included on the Start Menu in the NaviCOPA group - other such generators will not work with NaviCOPA


AuthName "This is a Password Protected Web Site"
This line defines the Title used for the username/password box that will popup in the browser when an attempt is made to access this directory.


Places limits on the access to this directory. In this case limits are placed on getting pages from and posting forms to this directory.


require valid-user
Requires that a valid username/password is used to access this directory in accordance within the limits set above. Without this, the settings for AuthUserFile and AuthName will not operate.


The end of the section placing limits on access to this directory.


DirectoryIndex alternative.htm another.html index.html
This sets the priorities for the 'index' page for the directory (by default this is usually index.html or index.htm if the former doesn't exist.


In the case above, if the URL http://www.mydomain.com were requested (no page specified), then alternative.htm would be served if it exists. If it does not exist, then another.html would be served, and if that didn't exist, then index.html would be served.


If none of these pages exist, then a 404 error page will be sent.