Welcome! Log In Create A New Profile

Advanced

Re: How to redirect to a query

March 09, 2011 04:58AM
On 09.03.2011, at 12:51, sjark wrote:

> Same problem I get this error in chrome 310
> (net::ERR_TOO_MANY_REDIRECTS):
>
> [code]
> server {
> listen 80 default;
> server_name www.mysite.com;
> root /home/www/mysite;
> include standard.conf; #php-fpm settings
>
> location = / {
> rewrite ^ /?index=site&id=1? permanent;
> }
> }
> [/code]


location = / {
if ($arg_index = "") {
rewrite ^ /?index=site&id=1 permanent;
}

fastcgi_pass ...
... etc ...
}

or you may do without redirect at all:

location = / {
fastcgi_pass ...
fastcgi_param SCRIPT_FILENAME /path/to/index.php;
fastcgi_param QUERY_STRING index=site&id=1;
... etc ...
}


--
Igor Sysoev
http://sysoev.ru/en/


_______________________________________________
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: 111
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