Thanks, but no, I'm not confusing location with host name.<div><br></div><div>I'm trying to redirect any requests on our domain as follows:</div><div><br></div><div><a href="https://www.ourdomain.com/youtube/v/mydjFYoD4WS&hl=en_US&fs=1&rel=0&autoplay=1">https://www.ourdomain.com/youtube/v/mydjFYoD4WS&hl=en_US&fs=1&rel=0&autoplay=1</a></div>
<div><br></div><div>to:</div><div><br></div><div><a href="http://www.youtube.com/v/mydjFYoD4WS&hl=en_US&fs=1&rel=0&autoplay=1">http://www.youtube.com/v/mydjFYoD4WS&hl=en_US&fs=1&rel=0&autoplay=1</a></div>
<div><br></div><div>This is to solve a SSL warning issue. We're already doing it on another site using the .htaccess rule I provided.</div><div><br></div><div>See: <a href="http://www.adammershon.com/display-youtube-videos-on-ssl-page/">http://www.adammershon.com/display-youtube-videos-on-ssl-page/</a></div>
<div><br></div><div>for more specific information and example.</div><div><br><div class="gmail_quote">On Wed, Dec 29, 2010 at 10:37 AM, António P. P. Almeida <span dir="ltr"><<a href="mailto:appa@perusio.net">appa@perusio.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On 29 Dez 2010 15h30 WET, <a href="mailto:iberkner@gmail.com">iberkner@gmail.com</a> wrote:<br>
<br>
> [1 <multipart/alternative (7bit)>]<br>
> [1.1 <text/plain; ISO-8859-1 (7bit)>]<br>
<div class="im">> Looking to do something like this:<br>
><br>
> RewriteRule ^youtube/(.*)$ <a href="http://www.youtube.com/$1" target="_blank">http://www.youtube.com/$1</a> [L]<br>
><br>
> This the configuration I'm thinking of?<br>
><br>
> location /youtube/<br>
</div> ^^^^^^^^^<br>
<br>
This means that you have a location /youtube not a host (vhost) <a href="http://youtube.com" target="_blank">youtube.com</a><br>
<div class="im"><br>
> {<br>
> rewrite ^(.*)$ <a href="http://www.youtube.com" target="_blank">http://www.youtube.com</a>$1<br>
> }<br>
<br>
</div>You seem to be confusing host (server_name) with location. That type<br>
of rewriting must be done at the server (virtual host) level.<br>
<br>
Cf. <a href="http://wiki.nginx.org/Pitfalls#Server_Name" target="_blank">http://wiki.nginx.org/Pitfalls#Server_Name</a><br>
<br>
--- appa<br>
<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>