1
I'm having trouble figuring out the correct syntax for an Apache directive.
I have a directory "one" with subdirectories "two" and "three":
example/one
example/one/two
example/one/three
These are all within the web document root.
I want to allow browser access to example/one/two, but deny browser access to example/one/three.
One way of doing this to to put an .htaccess file in example/one/three with contents "Deny from all". But I'd prefer to place the .htaccess file in example/one instead.
I've made several attempts, but can't figure out the proper directives.
Here's one attempt that's wrong (results in "500 Internal Server Error"):
<Location ~ "^.*/xxx/example/three/.*$">
Deny from all
Location>
(The "xxx" is not really there, I'm only putting it here to represent the first part of the path.)
Any suggestions on how to fix this?