I have this line in my config file
server_name site.com m.site.com
My code checks if the url is m.site.com and serves the mobile version. However when I do this going to m.site.com/abc will show my code site.com/abc which is wrong. If I copy/paste the entire block and change site.com to m.site.com it works fine. But I'd rather not have duplicate config (or code).
Is there a way around this?