Welcome! Log In Create A New Profile

Advanced

Re: How to redirect to a query

March 09, 2011 05:50AM
Thanks that works! one more question

can I do something like this if $host = 'one.mysite.com' and $arg_index = "" then it should go to one.mysite.com/?index=site&id=1 if two.mysite.com it go to two.mysite.com/?index=site&id=2

Tryed to replayed AND with & or && but it just give me a error "configuration file /etc/nginx/nginx.conf test failed"
and I am not allowed todo a if inside of a if
[code]
location = / {
if ($host = 'one.mysite.com' AND $arg_index = "") {rewrite ^ ?index=site&id=1 permanent;}
if ($host = 'two.mysite.com' AND $arg_index = "") {rewrite ^ ?index=site&id=2 permanent;}
}
[/code]
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: 86
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready