Hi,
Based on some info on this newsgroup, I'm trying to password protect a
directory of both PHP, HTML, and image files. The web server is Apache
2 and PHP is 4.4.4. I created this .htaccess file
RewriteCond %{REQUEST_FILEN AME} -f
RewriteCond %{REQUEST_FILEN AME} !^accesscontrol .php
RewriteRule ^(.*?)$ accesscontrol.p hp?file=$i&%{QU ERY_STRING} [NC,L]
and then, just to check to make sure requests were hitting hte
accesscontrol.p hp file, I created accesscontrol.p hp to look like below
....
<?php
header('HTTP/1.0 401 Unauthorized');
exit;
?>
so theoretically, every request should result in a 401. However, when
I visit a page in the directory where this stuff is stored, I can view
the page just fine. Why is the above failing to filter my requests?
Thanks, - Dave
Based on some info on this newsgroup, I'm trying to password protect a
directory of both PHP, HTML, and image files. The web server is Apache
2 and PHP is 4.4.4. I created this .htaccess file
RewriteCond %{REQUEST_FILEN AME} -f
RewriteCond %{REQUEST_FILEN AME} !^accesscontrol .php
RewriteRule ^(.*?)$ accesscontrol.p hp?file=$i&%{QU ERY_STRING} [NC,L]
and then, just to check to make sure requests were hitting hte
accesscontrol.p hp file, I created accesscontrol.p hp to look like below
....
<?php
header('HTTP/1.0 401 Unauthorized');
exit;
?>
so theoretically, every request should result in a 401. However, when
I visit a page in the directory where this stuff is stored, I can view
the page just fine. Why is the above failing to filter my requests?
Thanks, - Dave
Comment