apache to nginx rewrite rule
Ilan Berkner
iberkner at gmail.com
Wed Dec 29 20:04:11 MSK 2010
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/
for more specific information and example.
On Wed, Dec 29, 2010 at 10:37 AM, António P. P. Almeida <appa at perusio.net>wrote:
> On 29 Dez 2010 15h30 WET, iberkner at gmail.com wrote:
>
> > [1 <multipart/alternative (7bit)>]
> > [1.1 <text/plain; ISO-8859-1 (7bit)>]
> > Looking to do something like this:
> >
> > RewriteRule ^youtube/(.*)$ http://www.youtube.com/$1 [L]
> >
> > This the configuration I'm thinking of?
> >
> > location /youtube/
> ^^^^^^^^^
>
> This means that you have a location /youtube not a host (vhost)
> youtube.com
>
> > {
> > rewrite ^(.*)$ http://www.youtube.com$1
> > }
>
> You seem to be confusing host (server_name) with location. That type
> of rewriting must be done at the server (virtual host) level.
>
> Cf. http://wiki.nginx.org/Pitfalls#Server_Name
>
> --- appa
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20101229/e7ad1fce/attachment.html>
More information about the nginx
mailing list