Posted by:
toumimi
(---.84.114-78.rev.gaoland.net)
Just to finish with a complete solution :
- Create a folder protect outside of your www folder
- Create a file named .htpasswd into protect folder
Add valid users in it, as user:md5_password (example here : user test / password beta)
=> Use this to generate one line : [aspirine.org])
Remember : You must place only one user:password per line
test:$apr1$IEbc5CFH$nuCPerNecAEolN2n/NpKV.
- Create a file named
.htgroup into protect folder
Add valid groups in it, as group1:user1 user2...
Remember : You must place only one group:users per linefriends:test
- Create a file named
.htaccess into desired folder
AuthUserFile D:\wamp\protect\.htpasswd
AuthGroupFile D:\wamp\protect\.htgroup
AuthType Basic
AuthName "Restricted Area"
Require group friends
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Satisfy Any
Using this structure, you can easily add others users, but only those in
friends group will be able to access your homepage...
You can also use groups if you want to restrict parts in www folders (with another .htaccess for example).
Hope it will be useful...
Florian
WampServer Patch (
Screenshots)
Topic EN :
www.wampserver.comTopic FR :
www.wampserver.com