View Single Post
Old 08-08-2010, 01:17 PM  
CHMOD
Confirmed User
 
CHMOD's Avatar
 
Join Date: Jun 2003
Posts: 1,697
Quote:
Originally Posted by borked View Post
Add this to the header file after autnetication

Code:
if ( isset( $_SERVER['PHP_AUTH_USER'] ) ) {
  $banned_users = file( '/www/path/website/ban.dat' );
  if ( is_array($banned_users) ) {
    foreach ($banned_users as $user) {
      if ( $user == $_SERVER['PHP_AUTH_USER'] ) {
         header( "Location: http://www.domain_name.com/ban.htm?" . $_SERVER['PHP_AUTH_USER'] );
      }
  }
}

Thanks for the hint !

But I can allready write in PHP.
For some reasons, I need it absolutely in a htaccess file.
CHMOD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote