Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-maximum-upload-file-size domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/news.numlock.ch/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the math-captcha domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/news.numlock.ch/public_html/wp-includes/functions.php on line 6114
Apache: How to deny access to a parent directory/location only – A changelog by Daniel Mettler

Apache: How to deny access to a parent directory/location only

If you want to deny public access to a parent location (let’s say /projects/), but allow public access to a sub-location (/projects/myproject/), use the following statement in httpd.conf:

<Location /projects>Order allow,deny</Location>
<Location /projects/myproject>Order deny,allow</Location>

(can also be used for <Directory> statements etc.)

Note that the URL of the sub-location must include a trailing slash (e.g. “https://news.numlock.ch/projects/myproject/”)

One Reply to “Apache: How to deny access to a parent directory/location only”

Leave a Reply

Your email address will not be published. Required fields are marked *

2 × = 16

This site uses Akismet to reduce spam. Learn how your comment data is processed.