Welcome! Log In Create A New Profile

Advanced

Re: How to redirect to a query

Francis Daly
March 08, 2011 04:06PM
On Tue, Mar 08, 2011 at 09:43:41AM -0500, sjark wrote:

Hi there,

> I Need help with if someone enter www.mysite.com it redirect to
> www.mysite.com/site.php?site=1

location = / {
rewrite ^ /site.php?site=1? permanent;
}

in the right server{} block should do what you ask for.

It might do what you want if the initial request is for something like
www.mysite.com/?query

Good luck,

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: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready