title: How to redirect a URL for example (www.foobar2.com) to another URL (www.foobar.com) using htaccess file
body: <p>I am setting up a link which should open another website. For example, if a browser is opening up <strong><em>www.foobar2.com</em></strong>, it should open <strong><em>www.foobar.com</em></strong> without changing the URL. I found out that it can be done using <strong><em>.htaccess</em></strong> file. Currently, if I open, <strong><em>www.foobar2.com</em></strong>, it redirects to <strong><em>www.foobar.com</em></strong> but the URL also changes to <strong><em>www.foobar.com</em></strong>. But I want that URL should not change. What do I need to do?</p>
  
  <p>I tried this which isn't working - </p>
  
  <pre><code>RewriteCond %{HTTP_HOST} ^www.foobar2.com
  RewriteRule ^(.*) http://www.foobar.com [P]
  </code></pre>
  
  <p>Please help me with this.
  Thanks :)</p>