apache to nginx rewrite rule

António P. P. Almeida appa at perusio.net
Wed Dec 29 23:10:59 MSK 2010


On 29 Dez 2010 19h59 WET, igor at sysoev.ru wrote:

> On Wed, Dec 29, 2010 at 02:56:10PM -0500, Ilan Berkner wrote:
>
>> that worked, thanks
>
> You do not need "break".
>
> location /youtube {
> rewrite ^/youtube/(.*)$ http://wwww.youtube.com/$1;
> }
>
> This is enough.

Yes. There's no point in having a flag here, since the redirect is to
an external site, so no other location is tried for handling the
request. It exits immediately.

Thanks Igor,
--- appa




More information about the nginx mailing list