You are here: Home » Products » Homepage Password » Construction


htaccess and htpasswd files.

Htaccess files are server configuration files for directories. Htaccess files always apply for that directory, in which they got saved and all their subdirectories of those. If you wish other settings schemes for the subdirectories, you will just have to save another htaccess file in that subdirectory. The data of the actual file overwrites the data of htaccess files in heading directories.

The password protection consists of two files

  • .htaccess - This file regulates the protection for that directory, in which it is located and all subdirectories .
  • .htpasswd - This file contains the user names and the associated passwords.

Construction - .htaccess and .htpasswd file.

.htaccess file:

AuthName "Top Secret"
AuthType Basic
AuthUserFile /.htpasswd
require valid-user

AuthName = The name that appears in the password dialog.
AuthType = Auth type directive.
AuthUserFile =The command AuthUserFile contains the absolute path on the server, where to find the file htpasswd. That’s not the path of the directory of your homepage. see ServerPath

require valid-user = all users in the password file will be approved (.htpasswd file)

.htpasswd file:


z.B. user1 username with coded password ($1$is911rlD$irXTnoD7uq2wUYlHMo2ek.)