tags:

views:

27

answers:

1

How can i deny access to a complete folder and sub-folders, with the exception of one file? That file is: toon.php and resides in the same folder.

A: 

You may want to use the <Directory> and <Files> directives. You can look at the documentation here:

http://httpd.apache.org/docs/1.3/mod/core.html#directory

http://httpd.apache.org/docs/1.3/mod/core.html#file

In short, you want something like this:

<Directory /folder/without/access >
     Order Deny,Allow
     Deny from All
</Directory>

<Files "filename">
     Order Deny,Allow
     Allow from All
</Files>
William