Ok, I have a problem. I have a site that has to correctly redirect over 400 pages to another domain. The problem is that the original domain has varying subdomain configurations - sub1.domain.com, www.sub1.domain.com, sub2.domain.com, www.sub2.domain.com, etc... What is the BEST way to set up Nginx to catch all these variation and redirect them to new domain.com/page1, new domain.com/page2, etc... Currently, all sub1, sub2, www, etc are set up in DNS and WordOps, but I don't know how to properly redirect those pages, especially the www.sub1 type of stuff.
Is there a better way to do this?