How to redirect to a query

Francis Daly francis at
Wed Mar 9 14:28:49 MSK 2011

On Wed, Mar 09, 2011 at 04:51:31AM -0500, sjark wrote:

Hi there,

> Same problem I get this error in chrome 310

>     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 redirecting to (for which the suggested config should

This question is about redirecting to (for which, as Igor showed, you must
check the "args" of the query string).

And the next question is about and 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.


Francis Daly        francis at

More information about the nginx mailing list