title: Apache: Can't reroute URL from "file.123.ext" to "file.ext" using mod_rewrite in htaccess file
body: <p>I'm trying to implement cache busting, as prescribed by: <a href="http://html5boilerplate.com/docs/cachebusting/" rel="nofollow">http://html5boilerplate.com/docs/cachebusting/</a></p>
  
  <p>However when I add the following to the .htaccess file in my media folder:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>and then I try to access a style sheet at: "/media/css/styles.1234.css", Apache complains with:</p>
  
  <pre><code>Not Found
  
  The requested URL /media/css/styles.1234.css was not found on this server.
  </code></pre>
  
  <p>I can access styles.css at "/media/css/styles.css" so it's there and it works. I also know that the htaccess file gets processed because we also disallow directories from being browsed in the media folder with "Options -Indexes". Here is the htaccess file in its entirety:</p>
  
  <pre><code>Options -Indexes
  AllowOverride All
  
  &lt;IfModule mod_rewrite.c&gt;
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Also mod_rewrite has been confirmed to be loaded with this command: 'a2enmod rewrite'. Not sure what I'm doing wrong...</p>