I would like to generally protect my site but allow one certain path.
However, I need rewrites to forward the requested path to a PHP file.
Unfortunately the following does not work:
Thanks for the quick reply, nested locations are nice, but they do not
help in this special case. A request to /feeds/importer/* has to be
rewritten to /index.php?q=feeds/importer/* and that should not be
protected. Is unprotecting a path with a special query possible at all?
On Thu, May 19, 2011 at 10:10:59PM +0400, Maxim D. wrote:
/etc/nginx/htpasswd/protected;
...
Note that the only goal of rewrite is to properly change url while
correctly escaping new arguments and stripping old ones (note
trailing ‘?’), as you probably don’t want to allow unauthenticated
users to supply arbitrary arguments to your index.php. Due to
‘break’ request doesn’t leave the location in question after
rewrite and processed there.
On Thu, May 19, 2011 at 12:43:03PM -0400, klausi wrote:
fastcgi_pass ...
}
}
Thanks for the quick reply, nested locations are nice, but they do not
help in this special case. A request to /feeds/importer/* has to be
rewritten to /index.php?q=feeds/importer/* and that should not be
protected. Is unprotecting a path with a special query possible at all?
Ah, sorry, I missed you actually want /feeds/importer/… to be
fully handled by index.php. This makes configuration even
simplier:
Note that the only goal of rewrite is to properly change url while
correctly escaping new arguments and stripping old ones (note
trailing ‘?’), as you probably don’t want to allow unauthenticated
users to supply arbitrary arguments to your index.php. Due to
‘break’ request doesn’t leave the location in question after
rewrite and processed there.