Welcome! Log In Create A New Profile

Advanced

Query strings duplicating on 301 redirect

Justin Dorfman
May 05, 2014 03:16PM
Hey All,

I am trying to redirect (301) all HTTP request to TLS (HTTPS) and I keep
getting duplicate query strings added to the uri. e.g.:

curl -I "http://foo.bar.example.com/foobar.css?v=2"
HTTP/1.1 301 Moved Permanently
[clipped]
Location: http://foo.bar.example.com/foobar.css?v=2?v=2

Nginx config:

location / {
if ($scheme = http) {
rewrite ^ https://$http_host$request_uri permanent;
}

Any ideas?

Thanks in advance.

Regards,

Justin Dorfman http://www.twitter.com/jdorfman
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Query strings duplicating on 301 redirect

Justin Dorfman May 05, 2014 03:16PM

Re: Query strings duplicating on 301 redirect

Francis Daly May 05, 2014 04:12PM

Re: Query strings duplicating on 301 redirect

Justin Dorfman May 05, 2014 04:56PM

Re: Query strings duplicating on 301 redirect

Richard Stanway May 05, 2014 05:10PM

Re: Query strings duplicating on 301 redirect

Justin Dorfman May 05, 2014 07:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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