I don't understand why someone would want to go to a lot of trouble to build a website and then ban people from seeing it.
However, the answer to your question is 'no'. You can't dynamically modify .htaccess from php. You could however have a database which stored the IP addresses of the folk you wanted to ban, and a procedure for checking the ip address of each request against the banned list.
php and apache
Moderator: General Moderators
Re: php and apache
How did you figure that? .htaccess is a regular file and can be modified with PHP. Your database approach is more correct, but the other option is feasible.You can't dynamically modify .htaccess from php