title: Nginx rewrite - only redirect to one domain
body: <p>I am looking to redirect all requests that match <a href="http://s.domain.com" rel="nofollow">http://s.domain.com</a> to redirect to <a href="http://domain-new.com" rel="nofollow">http://domain-new.com</a></p>
  
  <p>I have the following and it seems to redirect all requests to the second domain.  I would only like to redirect on an exact match.</p>
  
  <pre><code> if ($request_uri ~ "s.domain.com"){
         rewrite ^ http://domain-new.com;
       }
  </code></pre>