Quote:
Originally Posted by borked
Varius is correct - htaccess cannot prepend/append files, so your only way is to prepend the htaccess file with the list of banned users as this format:
setenvif remote_user "username1" banned
setenvif remote_user "username2" banned
so that in htaccess, you have something like this:
Code:
##BANNED USERS##
setenvif remote_user "username1" banned
setenvif remote_user "username2" banned
AuthName 'My Protected Area'
AuthType Basic
AuthUserFile /home/var/etc/.htpasswd (or authmysql if you're using that)
<Files *>
deny from env=banned
</Files>
if you add the
##BANNED USERS##
line, you can have a script automatically update your htaccess by replacing
##BANNED USERS##
with
##BANNED USERS##
setenvif remote_user "username3" banned
that should take care of things
|
Ultimatly, I could use this solution...
I'll try to see if it work !
But I would still prefer to have the banned names in an external flat file.