title: www to non www in .htaccess where subdomain already exists
body: <p>I have found loads of examples of rewrite rules for non www to www but i am just looking to check what the practice is for allowing www. redirects when subdomain already exists...</p>
  
  <p>So let's say i want to enable people to type:</p>
  
  <pre><code>http://www.shop.mysite.com
  </code></pre>
  
  <p>and have them redirected to </p>
  
  <pre><code>http://shop.mysite.com
  </code></pre>
  
  <p>Would the sequence below allow this?</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{HTTP_HOST} ^www\.shop\.mysite\.co\.uk$ [NC]
  RewriteRule ^(.*)$ http://shop.mysite.co.uk/$1 [L,R=301]
  </code></pre>
  
  <p>Yes i know this seems kind of silly but people in my organisation are freaking out about the possibility of people typing out our full subdomain url and including a www. Looking to try and allay their fears.</p>
  
  <p>Sorry for the noob nature of the question.</p>
  
  <p>Kind regards, </p>
  
  <p>C</p>