title: How do I redirect one subdomain to another, when they both point to the exact same files?
body: <p>I have a site that has two domains pointing to it, let's call them:</p>
  
  <pre><code>work.mysite.com
  play.mysite.com
  </code></pre>
  
  <p>This is bad practice, so I want to choose <code>work.mysite.com</code> and make it the canonical URL, permanently redirecting <code>play.mysite.com</code> to it.</p>
  
  <p>I'm in the root directory for these two domains, in a .htaccess file, banging my head against the cement floor and wishing I wasn't here. Here's what I am currently trying. Tell me how totally wrong I am, please?</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteCond %{HTTP_HOST} ^(www\.)?play\.mysite\.com [NC]
  RewriteRule ^/?(.*)?$ http://work.mysite.com/$1 [R=301]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>That gets me a really pretty 500 Internal Server Error. How far off am I?</p>