You are here: Re: htaccess password protection folder and no pass in subfolder « All PHP « IT news, forums, messages
Re: htaccess password protection folder and no pass in subfolder

Posted by David on 04/23/06 21:21

eugene2005 wrote:
> I protect /rootfolder/
> with
> AuthName "Admin Center"
> AuthType Basic
> AuthUserFile /home2/winameri/.htpasswd
> AuthGroupFile /dev/null
> require valid-user
>
> and dont want to protect /rootfolder/subfolders/
>
> how can I do that?
>
>
As far as I know you can't.

..htaccess protects the directory that it is in plus all sub directories
within that directory.

Do you have access to the httpd.conf files? you maybe able to do
something like you want by placing you authentication within the
httpd.conf file

Example

<VirtualHost xxx.xxx.xxx.xxx>
DocumentRoot /path/to/your/document/root
ServerName servername.com
ServerAlias www.servername.com
ServerAdmin emailaddress@servername.com
<Directory "/path/to/directory/that/needs/protected">
AllowOverride AuthConfig
AuthType Basic
AuthName "My Secure Area"
AuthUserFile /path/to/.htpasswd
Require valid-user
</VirtualHost>

Good luck!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация