title: Redirect IP address to domain name in .htaccess
body: <p>I'm trying to redirect the IP address to the domain name of my website.  This is my .htaccess file:</p>
  
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  
  RewriteBase /
  
  RewriteCond %{HTTP_HOST} ^198\.50\.227\.185 [nc]
  RewriteRule ^(.*)$ http://www.allrealfood.com/$1 [r=301,nc,L]
  
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  
  <p>I can't figure out how to get this to work.</p>