Welcome! Log In Create A New Profile

Advanced

SOLVED Re: Problem with return 302 redirection, with Nginx 1.3.11 + Drupal 7

Mark Alan
January 23, 2013 03:32PM
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
Subject Author Posted

Problem with return 302 redirection, with Nginx 1.3.11 + Drupal 7

Mark Alan January 23, 2013 06:48AM

Re: Problem with return 302 redirection, with Nginx 1.3.11 + Drupal 7

Francis Daly January 23, 2013 07:04AM

Re: Problem with return 302 redirection, with Nginx 1.3.11 + Drupal 7

António P. P. Almeida January 23, 2013 08:14AM

SOLVED Re: Problem with return 302 redirection, with Nginx 1.3.11 + Drupal 7

Mark Alan January 23, 2013 03:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 225
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