|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
.htaccess permisions
Can an entire directory be set to only allow certain users in the. htaccess file. I know you can specify IP address to allow, but what about user names.
or can PHP look in the .htaccess file kind of like a cookie, i want to protect an entire directory with out having to attach a permision script to each page in the directory. Thanks Dave Last edited by dfano : June 20th, 2003 at 09:31 AM. |
|
#2
|
|||
|
|||
|
place this in your .htaccess
Code:
AuthUserFile /path/to/web/.htpasswd AuthName "Authorized Access Only!" AuthType Basic <Limit GET POST> require valid-user </Limit> and then create your .htpasswd file on your server. unix command is htpasswd -c /path/to/.htpasswd username this "/path/to/.htpasswd" corresponds to the above code "AuthUserFile /path/to/web/.htpasswd" **after the .htpasswd file has been created you don't need to use the -c flag anymore. cheers
__________________
-- Jason |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Server Configuration > .htaccess permisions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|