title: .htaccess Remove WWW from URL + Directories
body: <p>This seems to be a non-issue for many people (read: I can't find an answer), but I would like to update the following htaccess code to not only remove the 'www' from the URL, but also any sub-directories that are accessed.</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
  </code></pre>
  
  <p>With this, <a href="http://www.example.com/any/">http://www.example.com/any/</a> resolves fine, but I want it to redirect to <a href="http://example.com/any/">http://example.com/any/</a> as with the root.</p>