Welcome! Log In Create A New Profile

Advanced

Re: restrict sub-directory access divert if not authenticated

March 16, 2015 07:59PM
Hi thanks for that

your suggestion:
-----------------
So you say that /shop/index.php doesn't land to /shop/ location? Then
ensure that you don't have location /shop/index.php , otherwise see
debug log
-------------------

I do want access to /shop/ as well as /shop/index.php - but only to a select ip-range or password

my directive works for /shop/

but if someone types in /shop/index.php they will see the index.php page since the directive for php files overwrites the shop subfolder directive.

They see the php file but the html, js, css, img resources does not load because those do still obey my "location /shop/" directive

I guess I have to either

1. declare as: "location /shop/ ~ \.php$"

or

2. inside the location "/shop/" directive have a clause to force php not to obey the above "location ~ \.php$" directive
Subject Author Posted

restrict sub-directory access divert if not authenticated

jacograaff March 16, 2015 01:11AM

Re: restrict sub-directory access divert if not authenticated

Dmitry Pryadko March 16, 2015 06:38AM

Re: restrict sub-directory access divert if not authenticated

jacograaff March 16, 2015 07:59PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready