Welcome! Log In Create A New Profile

Advanced

Re: apache to nginx rewrite rule

António P. P. Almeida
December 29, 2010 10:46AM
On 29 Dez 2010 15h30 WET, iberkner@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@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

apache to nginx rewrite rule

iberkner December 29, 2010 10:34AM

Re: apache to nginx rewrite rule

António P. P. Almeida December 29, 2010 10:46AM

Re: apache to nginx rewrite rule

iberkner December 29, 2010 12:08PM

Re: apache to nginx rewrite rule

António P. P. Almeida December 29, 2010 12:24PM

Re: apache to nginx rewrite rule

iberkner December 29, 2010 03:00PM

Re: apache to nginx rewrite rule

Igor Sysoev December 29, 2010 03:02PM

Re: apache to nginx rewrite rule

António P. P. Almeida December 29, 2010 03:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 158
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready