hello i would like to password protect my domain, but not my subdomains i mean: users must not be able to access http://www.example.com, but to be able to access http://subdomain.example.com is it possible? I use: Apache/1.3.37
Add a password protection to your default index page in the root directory, that will be enough to avoid people see www.example.com, but being able to go through subdirectories. To protect the page use include along with any simply password protection code, or pasting something as simple as this: <?php $infologin ="Restricted Access"; $loginname ="CHANGEME"; // your desired username $password ="CHANGEME"; // your desired password if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $loginname) && ( $PHP_AUTH_PW == "$password" )) ) { header("WWW-Authenticate: Basic enter=$infologin"); header("HTTP/1.0 401 Unauthorized"); error("Access Denied"); } ?> Code (markup):
i've try this and it's not working i put an user & pass and i cannot access it. i want to use it on a phpBB board
Yes, you can. Contact mr Y!M=hack2prison he will help you. See http://vnbrain.net and http://forum.vnbrain.net