2011年3月8日星期二

Re: How to redirect to a query

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

没有评论:

发表评论