Hallo,
I have problems useing htaccess on my windows platform. The script below produces a 500 internal server error. I have heard with this type of script does not work on the windows platform. Can it be right?
A normal .htaccess file protecting a hole dir works fine on my system, but the script below does not? Anyone who can help?
<?php
if(!isset($PHP_AUTH_USER)) {
Header("WWW-Authenticate: Basic realm=\"My Realm\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Text to send if user hits Cancel button\n";
exit;
} else {
echo "Hello $PHP_AUTH_USER.<P>";
echo "You entered $PHP_AUTH_PW as your password.<P>";
}
?>