I found an Nginx example for forcing the host name and wanted to know if this is the best way to do it. Basically I have several domains, some are misspellings of our primary domain and we want them to all go to our primary domain. So I found this example:
<br><pre>server { <br> listen 80; <br> server_name <a href="http://example.com">example.com</a> <a href="http://www.example.com">www.example.com</a>;<br><br> if ($host != '<a href="http://example.com">example.com</a>
' ) {<br> rewrite ^/(.*)$ <a href="http://example.com/$1">http://example.com/$1</a> permanent;<br> }<br>}<br></pre><br>Is this the best way?<br clear="all"><br>-- <br>Fred Palmer | Senior Software Engineer<br>
615.653.7228 | <a href="http://www.studionow.com">www.studionow.com</a>