This is a discussion on How to make use of .htaccess file to password protect a directory from users within the PHP Programming forums, part of the Web Development category; How to make use of .htaccess file to password protect a directory from users Htaccess files affect the directory, they ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| How to make use of .htaccess file to password protect a directory from users Htaccess files affect the directory, they are placed in and all sub-directories, i.e., an htaccess file located in your root directory (myexample.com) would affect yoursite.com/content, yoursite.com/content/contents, etc. ### BASIC PASSWORD PROTECTION ### AuthName "CP3024 password example" AuthType Basic AuthUserFile /home/staff/acad/jphb/public_html/cp3024/passex/passwd Require compu3024 By using the htpassswd command we can create a .htpasswd file " htpasswd -c file-name user-name " example--> htpasswd -c passwd compu3024 where file-name refers to the file to hold the password and user-name is the user-name associated with the "realm" make sure password file is world readable |
|
#2
| |||
| |||
| Are you know what is the use of ErrorDocument setting in .htaccess. Thanks for Advance. --kamal. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| windows 2008 server to hide users folders in c:\users\*[/ | shaalini | Operating Systems | 3 | 06-26-2009 12:47 AM |
| how can i make a home page which have user name and password? | suman | Web Design Help | 5 | 12-20-2008 04:21 PM |
| How to Password-Protect Web Pages: tutorial | suman | HTML, CSS and Javascript Coding Techniques | 0 | 08-08-2008 02:16 AM |
| How to attach or mount a file system to the linux root directory.? | itbarota | Operating Systems | 1 | 07-25-2007 11:43 PM |
| Htaccess www to non www | vadivelanvaidyanathan | Search Engine Optimization | 0 | 06-30-2007 12:13 AM |
Our Partners |