On Wed, 23 Jan 2013 14:13:10 +0100, António P. P. Almeida
<appa@perusio.net> wrote:
> > location ~* ^/(\?q=)?(?:user|admin|contact$) {
> > return 302 https://$host$request_uri;
> > }
>
> Locations don't match the query string part.
Oh no... bitten again by that characteristic of Location.
One of those (rare) cases that we must use an IF:
# SOLVED: to remove '?q=' from a query use:
if ($args ~ "q=(?<q>.*)?") { return 302 $scheme://$host/$q; }
Thank you António.
M.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
<appa@perusio.net> wrote:
> > location ~* ^/(\?q=)?(?:user|admin|contact$) {
> > return 302 https://$host$request_uri;
> > }
>
> Locations don't match the query string part.
Oh no... bitten again by that characteristic of Location.
One of those (rare) cases that we must use an IF:
# SOLVED: to remove '?q=' from a query use:
if ($args ~ "q=(?<q>.*)?") { return 302 $scheme://$host/$q; }
Thank you António.
M.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx