title: CSS/JS auto versioning .htaccess
body: <p>I'm having a problem with a rewrite rule that I'm using for auto versioning of my CSS and JS.</p>
  
  <p>I have the following HTML code to include my stylesheet:</p>
  
  <pre><code>&lt;link rel="stylesheet" type="text/css" href="includes/css/index_home.1364215354.css" /&gt;
  </code></pre>
  
  <p>I use this in my .htaccess to strip the dot and the 10 digits:</p>
  
  <pre><code>RewriteEngine On
  RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L]
  </code></pre>
  
  <p>When I load the site, the stylesheet fails to load even though if I point my browser to <a href="http://www.example.com/includes/css/index_home.css" rel="nofollow noreferrer">http://www.example.com/includes/css/index_home.css</a> I can see the stylesheet.</p>
  
  <p>The method I'm trying to use, I found here <a href="https://stackoverflow.com/questions/118884/what-is-an-elegant-way-to-force-browsers-to-reload-cached-css-js-files">How to force browser to reload cached CSS/JS files?</a></p>
  
  <p>I'm guessing the RewriteRule is the problem, but I don't know why.</p>