On Thursday 22 March 2012 00:15:00 Kurtis Mullins wrote:
> Hey,
>
> Is it possible to rewrite subdomains to paths? I want to do something like
> this:
>
> x.example.com/foo/bar/ -> www.example.com/x/foo/bar/
>
server {
server_name ~^(?P<subdomain>.+)\.example\.com$;
location / {
return 301 http://www.example.com/$subdomain$request_uri;
}
}
wbr, Valentin V. Bartenev
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx