Welcome! Log In Create A New Profile

Advanced

Re: How to redirect to a query

Francis Daly
March 09, 2011 06:32AM
On Wed, Mar 09, 2011 at 04:51:31AM -0500, sjark wrote:

Hi there,

> Same problem I get this error in chrome 310
> (net::ERR_TOO_MANY_REDIRECTS):

> location = / {
> rewrite ^ /?index=site&id=1? permanent;

That's not the config that was suggested. The "?" immediately after the
"/" makes all the difference.

The original question was about www.mysite.com redirecting to
www.mysite.com/site.php?site=1 (for which the suggested config should
work).

This question is about www.mysite.com redirecting to
www.mysite.com/?index=site&id=1 (for which, as Igor showed, you must
check the "args" of the query string).

And the next question is about one.mysite.com and two.mysite.com each
redirecting to similar urls with different query strings.

I'll reply to that one separately.

But different problems get different solutions. And if you don't know
whether the problems are different (and the docs give no hint), then it's
good to ask about the problem you care about rather than a simplified
version that is possibly significantly different.

Cheers!

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to redirect to a query

sjark March 08, 2011 09:43AM

Re: How to redirect to a query

Francis Daly March 08, 2011 04:06PM

Re: How to redirect to a query

sjark March 09, 2011 04:51AM

Re: How to redirect to a query

Igor Sysoev March 09, 2011 04:58AM

Re: How to redirect to a query

sjark March 09, 2011 05:50AM

Re: How to redirect to a query

Francis Daly March 09, 2011 07:04AM

Re: How to redirect to a query

Francis Daly March 09, 2011 06:32AM

Re: How to redirect to a query

sjark March 09, 2011 07:35AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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