Regex for rewrite of subdomains

etrader nginx-forum at nginx.us
Thu Feb 14 22:05:21 UTC 2013


I want to rewrite subdomains by adding a separate server for subdomains as


server {
server_name domain.com
...
}
server {
server_name *.domain.com
}

but how I can I ass a rewrite rule int the second server to process
subdomain requests as

keyword.domain.com/query=some to
domain.com/script.php?query=some&sub=keyword

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236231,236231#msg-236231



More information about the nginx mailing list