0

So far, I have:

order deny,allow
deny from all
allow from 127.0.0.1/8

This blocks the top directory (not root directory) of the folder I am trying to hide from anyone else except me, but it does not block subdirectories. I still want to have access to the directory, and all the examples I have seen use the Rewrite Engine to completely block access from subdirectories. How do I block the subdirectories as well? This is the opposite of the first suggested question:

How do I make .htaccess work on the current directory and not subdirectories?

Community
  • 1
  • 1
NobleUplift
  • 5,631
  • 8
  • 45
  • 87

2 Answers2

0

Your quoted config works as you need.

If it does block only the current directory but you're able to access a subdirectory of it - this is how I understand your description - it means, you changed the access rules with some further .htaccess and/or config in httpd.conf i.e. by allow from all

Kamil Šrot
  • 2,141
  • 17
  • 19
0

At first, I thought the closed beta packages I was testing were overriding my .htaccess file with their own, but they did not override any directory permissions.

At Kamil's suggestion, I looked into my httpd.conf and noticed that AllowOverride was set to None for the root directory of my web server. Setting it to All worked like a charm.

NobleUplift
  • 5,631
  • 8
  • 45
  • 87