Forum Moderators: phranque
I can ban IP addresses, and allow certian addresses using .htaccess, but they still have to use their username and password. Any suggestions, or does anyone know of a script that can do this, cgi or php?
many thanks
Trevor4370
Let's see if I can get this right:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^10.10.10.100(:80)?$
RewriteRule ^/(.*) ht[2][/2]tp://username:password@www.mydomain.com/$1 [L,R]
I don't think there's a clever way to do it with just mod_auth stuff... let me check though.
AuthType Basic
AuthName "Top Secret"
AuthUserFile .htpasswd
require valid-user
order deny,allow
deny from all
allow from 10.10.10.100
satisfy any Try that out. I've never used it before, so YMMV, but that's what the directive is there for. I'm pretty sure the syntax is correct.