On a Debian VPS I run an Apache 2.4.56 web server and I want to prevent any access to a parent URL, for instance
while allowing access to any of its children, for instance
The parent URL I want to block is a db-generated page that shows a listing of all the users. I do not want to serve this page, only its children.
I tried the following in my
<Location /participants> Order Allow,Deny </Location> <Location /participants/*> Order Deny,Allow </Location>
<Location /participants/> Options None AllowOverride None Require all denied </Location> <LocationMatch /participants/*> Require all granted </LocationMatch>
but both sets of directives return
301 - Forbidden for both parent and children URLs.
What's the right approach?