atom feed8 messages in ru.sysoev.nginxRe: How to redirect to a query
FromSent OnAttachments
sjarkMar 8, 2011 6:43 am 
Francis DalyMar 8, 2011 1:02 pm 
sjarkMar 9, 2011 1:51 am 
Igor SysoevMar 9, 2011 1:55 am 
sjarkMar 9, 2011 2:50 am 
Francis DalyMar 9, 2011 3:28 am 
Francis DalyMar 9, 2011 4:01 am 
sjarkMar 9, 2011 4:34 am 
Subject:Re: How to redirect to a query
From:Francis Daly (fran@daoine.org)
Date:Mar 9, 2011 3:28:19 am
List:ru.sysoev.nginx

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