redirect from www to sub-page

Maxim Dounin mdounin at mdounin.ru
Thu Jan 22 14:26:58 MSK 2009


Hello!

On Thu, Jan 22, 2009 at 12:15:35PM +0100, ha we wrote:

> Hi!
> 
> How can I redirect from www.example.com to www.example.com/new_location,
> but do not redirect if there is already a full address such as
> www.example.com/location?

location = / {
    rewrite ^ http://www.example.com/new_location;
}

Maxim Dounin





More information about the nginx mailing list