Converting subdomain to path component without redirect ?

henrique matias hems.inlet at gmail.com
Tue Apr 30 11:08:09 UTC 2013


*i meant: This is my "working" nginx.config ( without the rewrite rules ):


On 29 April 2013 22:02, henrique matias <hems.inlet at gmail.com> wrote:

> Hello guys,
>
> Am having trouble setting up my nginx.config to transparently proxy the
> subdomains and domains to the same app, but with different "path
> components" appended to the $uri
>
> example:
> mydomain.it/PATH should return ~> mydomain.com/it/PATH
>
> using regexp:
> (www\.)?mydomain\.(it|jp|es|de) to return my
> http://app_server/$2/$request_uri
>
> My idea is to proxy the "localised server_name" to the "default
> server_name" without letting the user know ( no browser redirect ).
>
> This is my "working" nginx.config ( without the rukes ):
> http://pastebin.com/v9pcVR4e
>
> This is my last unsuccessful attempt: http://pastebin.com/bZZA30zC
>
> any input is highly appreciated
>
> thanks a lot,
> peace
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130430/b7bea056/attachment.html>


More information about the nginx mailing list