Hi,
I have the following configuration entries:
location /admin/ {
allow x.x.x.x;
deny all;
}
location / {
rewrite . /index.php
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
}
If someone accesses /admin/xxx the allow/deny rules are being honoured, but the user sees 404 (because the URL is not rewritten to /index.php)
If I add "rewrite . /index.php" in the /admin/ location section it rewrites the URL, but everyone has access.
Is there a better way?