wildcard to rewritre multi domains to www

AMP Admin admin at ampprod.com
Sat Sep 5 17:57:57 MSD 2009

Hi, I would like to rewrite several domains to from .example.com to
www.example.com.  I think the best way is to use a wild card.  Too bad I
suck at rewrite rules. Haha

Can someone help me make the following work?

        if ($host != 'www.*.com') {
                rewrite  ^/(.*)$  http://www.*.com/$1  permanent;


-Team AMP 

More information about the nginx mailing list