denying access to a directory with htaccess
Posted by: desbrina
Posted on: 2009-05-05 03:46:00
I'm trying to deny access to a directory using htaccess. After reading on the net i think i have the code correct, but all it does is give Internal Server Errors. Someone on another forum said the code should work
Here's what i'm using
In reply to:<Files .htaccess>
order allow,deny
deny from all
</Files>
<Directory "scripts">
Order Deny,Allow
Deny from All
</Directory>
ErrorDocument 403 /403.php
ErrorDocument 404 /404.php
Here's what the error log gives
In reply to:[Tue May 05 03:41:42 2009] [alert] [client hidden] /home/calona/calona/.htaccess: <Directory not allowed here
[Tue May 05 03:41:42 2009] [alert] [client hidden] /home/calona/calona/.htaccess: <Directory not allowed here
[Tue May 05 03:41:54 2009] [alert] [client hidden] /home/calona/calona/.htaccess: <Directory not allowed here
[Tue May 05 03:41:54 2009] [alert] [client hidden] /home/calona/calona/.htaccess: <Directory not allowed here
[Tue May 05 03:42:09 2009] [error] [client hidden] client denied by server configuration: /home/calona/calona/.htaccess
[Tue May 05 03:42:09 2009] [error] [client hidden] File does not exist: /home/calona/calona/403.php
[Tue May 05 03:42:33 2009] [alert] [client hidden] /home/calona/calona/.htaccess: <Directory not allowed here
[Tue May 05 03:42:33 2009] [alert] [client hidden] /home/calona/calona/.htaccess: <Directory not allowed here
[Tue May 05 03:42:36 2009] [alert] [client hidden] /home/calona/calona/.htaccess: <Directory not allowed here
[Tue May 05 03:42:36 2009] [alert] [client hidden] /home/calona/calona/.htaccess: <Directory not allowed here
Anyone know what's wrong?