Posts: 15
Location: Perth, Australia
|
k, i've got the home server set up  , but for my site i want to use either .htaccess or basic http authorization. i've tried to get .htaccess to work but it..well...doesnt.
i've attached the two files, if someone could suggest something to do i'd be really greatful.
also does anyone know basic http authirization? i saw one on the internet but it didn't work
<?php
$auth = 0;
if (($PHP_AUTH_USER == "foo" ) && ($PHP_AUTH_PW == "bar" )) $auth = 1;
if ( $auth != 1 ) {
header( "WWW-Authenticate: Basic realm="Authorization Required!"" );
header( "HTTP/1.0 401 Unauthorized" );
echo 'Authorization Required!';
exit;
}
?>
what do i do?
|