title: .htaccess if file exists rewrite rule
body: <p>I found a couple of similar questions, but it seems like i need your help, because i'm not able to write it on my own.</p>
  
  <p>I want this: <a href="http://domain.com/folder/file.123.ext" rel="nofollow">http://domain.com/folder/file.123.ext</a> (should work also without 123)</p>
  
  <p>to be rewritten to /folder/file.min.ext (if it exists)</p>
  
  <p>or /folder/file.ext (if the minified version doesn't exist)</p>
  
  <p>It's for my css and js files ... so it will load non-minified versions for those files that doesn't have ones.</p>
  
  <p>I currently have this:</p>
  
  <pre><code>RewriteRule ^(css|js)/([a-zA-Z_-]+)\.([0-9]+)\.(css|js)$ /$1/$2.min.$4
  RewriteRule ^(css|js)/([a-zA-Z_-]+)\.(css|js)$ /$1/$2.min.$3
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(css|js)/([a-zA-Z_-]+)\.min\.(css|js)$ /$1/$2.$3
  </code></pre>
  
  <p>it works fine when i remove the second line ... but i need it to work also without the number :(</p>