|
| support index :: password protect |
|
Password Protecting with .htaccess NOTE: Do NOT edit the '.htaccess' file if you are using MS FrontPage! FrontPage uses the .htaccess file, and editing it may cause errors in your configuration. Create a .htaccess file in the directory that you want to protect. The .htaccess file can be placed in one or more of your /home/username/your_domain-wwwsub-directories This file can be used to restrict access to other files and web pages. When a request for a web page is made, the web server first checks for an .htaccessfile. The server begins this check by looking for .htaccessin the root of the current web directory, and on down the directory tree until it reaches the directory where the requested file resides. Since the placement of the .htaccessfile determines when it is executed, this fact can be used to restrict access only in certain sub-directories. Restricting Access: Password Protection The directory you want protected must have an .htaccess file in it that looks like the following: AuthUserFile /home/username/.passwd Groups and users are stored in the Group file, and passwords are stored in .passwd. The .htaccess file looks for these files in the /home/username/directory. Do not attempt to edit these manually! Redirects Redirecting allows you to send the user to, for example, new.html when they attempt to access old.html. To see this example in practice, simply add the following line (This should be typed as one single line without breaks) to the .htaccess file: Redirect /directory_name/old.html http://your_domain.com/directory_name/new.html Apache has a nice FAQ on redirects. |
|
copyright render-vue 1999 - © all rights reserved
|