Question
rewrite two www domains to same non-www domain on nginx
I have added two domains to my droplet (domain1.com and domain2.com)
I want to rewrite both www and non-www to domain1.com i.e.:
domain1.com => domain1.com
domain2.com => domain1.com
www.domain1.com => domain1.com
www.domain2.com => domain1.com
It feels like I have tried every combination of server blocks in nginx but I cannot get it to work properly.
nginx version: nginx/1.4.6 (Ubuntu)
How do I set this up?
-
everestmx August 9, 2014Reply Report
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×