title: How can I redirect from one subdomain to another in .htaccess?
body: <p>Recently we changed the name of a subdomain, now we need to redirect all the old pages to the new subdomain pages.</p>
  
  <p>Example page links:</p>
  
  <ul>
  <li><p>Old URL: <a href="http://jquery.webcodehelpers.com/2013/08/what-does-dollar-sign-means-in-jquery.html" rel="nofollow">http://jquery.webcodehelpers.com/2013/08/what-does-dollar-sign-means-in-jquery.html</a></p></li>
  <li><p>New URL: <a href="http://uieiq.webcodehelpers.com/2013/08/what-does-dollar-sign-means-in-jquery.html" rel="nofollow">http://uieiq.webcodehelpers.com/2013/08/what-does-dollar-sign-means-in-jquery.html</a></p></li>
  </ul>
  
  <p>My findings: when I try to access the subdomain in the top level it is working good.</p>
  
  <p>How can I redirect all URLs on the old subdomain to the new subdomain?</p>
  
  <p>currently i have the below code in .htaccess file , please guide to solve the problem </p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{HTTP_HOST} ^jquery\.webcodehelpers\.com$ [OR]
  RewriteCond %{HTTP_HOST} ^www\.jquery\.webcodehelpers\.com$
  RewriteRule ^/?$ "http\:\/\/uieiq\.webcodehelpers\.com\/search\/label\/jquery\ interview\ questions" [R=301,L]
  </code></pre>