Michael Shadle wrote:
> server_name ~^(.+)\.domain\.com$;
> rewrite ^ http://foo.com/index.php?title=$1 permanent;
Either do as Maxim suggested, with the P:
server_name ~ ^(?P<domain>.+)\.domain\.com$;
rewrite ^ http://foo.net/script/index.php?title=$domain permanent;
or save the capture into a variable:
server_name ~^(.+)\.domain\.com$;
set $domain $1;
rewrite ^ http://foo.net/script/index.php?title=$domain permanent;
Tobia
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx