another redirect

Denis S. Filimonov den.lists at gmail.com
Sun Mar 9 20:20:26 MSK 2008


try

location = /tips.ws {
    rewrite .* http://www.newsite.com/tips_and_receipes  permanent;
}

On Sunday 09 March 2008 11:30:05 Eire Angel wrote:
> they way it made sense to me,  is using
>
> if ($host = 'www.oldsite.com/tips.ws' ) {
>    rewrite  ^/(.*)$  http://www.newsite.com/tips_and_receipes  permanent;
> }
>
> but does nothing
>
> i also tries using the if sequence for request_filename.ws
> with no luck as well
> am i missing something.  like 6th grade .. :)
>
> Corey Donohoe <atmos at atmos.org> wrote: On 3/8/08, Eire Angel  wrote:
> > i have exhausted my resources on this one.  please help
> > if your able.
> >
> > i am moving to a new site.  the old site has some
> > good standing in google which points to
> > oldsite.com/tips.ws
> > now, the new site which is in rails
> > loads this page at newsite.com/tips_recipes
> >
> > is there anyway to have nginx
> > redirect this and also change its path on the way ?
>
> The rewrite module does an ok job.
>
> http://wiki.codemongers.com/NginxHttpRewriteModule



-- 
Denis.





More information about the nginx mailing list