title: Redirecting mysite.com/somepage/thispage.php to www.mysite.com/somepage/thispage.php
body: <p>I tried doing this</p>
  
  <pre><code>RewriteEngine On
  rewritecond %{http_host} ^mysite.com
  rewriteRule ^(.*) http://www.mysite.com/$1 [R=301,L]
  </code></pre>
  
  <p>but when i go to mysite.com, it took me to <a href="http://www.mysite.com/mysite" rel="nofollow">http://www.mysite.com/mysite</a>. So I removed the $1 and that seemed to fix the issue.</p>
  
  <p>But now that when I go to mysite.com/somepage/thispage.php, it does not work and shows the page not found (the www.mysite.com actually points to where the site is hosted, thats why I want mysite.com to go to www.mysite.com). How can I redirect that to mysite.com/somepage/thispage.php and also the other anything appended to mysite.com?</p>