In Meteor, I use the code "window.location.href=..." to redirect people from all www. urls to non www.
Where is the best place to put this code? I've tried putting it inside the Router as well as the Startup/Bootstrap code.
However, no matter what I do, the App loads first, then detects the www. url and redirects me.
What I want is Meteor to redirect ALL www. URLs to non www. before anything is loaded. I understand that htaccess is not possible in Meteor, so what is the alternative in Meteor?