apache to nginx rewrite rule
António P. P. Almeida
appa at perusio.net
Wed Dec 29 20:15:42 MSK 2010
On 29 Dez 2010 17h04 WET, iberkner at gmail.com wrote:
> Thanks, but no, I'm not confusing location with host name.
>
> I'm trying to redirect any requests on our domain as follows:
>
> https://www.ourdomain.com/youtube/v/mydjFYoD4WS&hl=en_US&fs=1&rel=0&autoplay=1
>
> to:
>
> http://www.youtube.com/v/mydjFYoD4WS&hl=en_US&fs=1&rel=0&autoplay=1
>
> This is to solve a SSL warning issue. We're already doing it on
> another site using the .htaccess rule I provided.
>
> See: http://www.adammershon.com/display-youtube-videos-on-ssl-page/
Try this:
location /youtube {
rewrite ^/youtube/(.*)$ http://wwww.youtube.com/$1 break;
}
--- appa
More information about the nginx
mailing list