title: Rewriting CNAME subdomain
body: <p>I have a sub domain that I want to redirect to a different location using mod_rewrite. For example:</p>
  
  <p>subdomain.example.com -> www.example.com/subdomain</p>
  
  <p>I don't want to send a redirect to the browser though (so it doesn't know the page is different).</p>
  
  <p>BTW subdomain.example.com has a CNAME record pointing to example.com.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Another example, just to clarify. It is very simple: If <a href="http://x.abc.com" rel="nofollow noreferrer">http://x.abc.com</a> is entered in to the browser, Apache returns the contents of <a href="http://www.abc.com/x" rel="nofollow noreferrer">http://www.abc.com/x</a>.</p>