how to rewrite or redirect a subdomain?

Steve Chu stvchu at
Wed Aug 8 18:16:44 MSD 2007

I digged the nginx rewrite module, found that it is hard to
rewrite/redirect a subdomain, here's my situation:
I wanna rewrite/redirect "" to
I found there's a Variables $host, but how to split it to get "xxx",
then use rewrite module?
any idea?

Steve Chu

More information about the nginx mailing list