Is there a better way to write this .htaccess directive?

Posted by Bill H on Stack Overflow See other posts from Stack Overflow or by Bill H
Published on 2010-05-22T02:08:58Z Indexed on 2010/05/22 2:10 UTC
Read the original article Hit count: 224

Filed under:
|

I want all css, javascript, and image file requests, that are named like this "filename.12345.css" to be re-routed to "filename.css".

The ".12345" part will always be numbers and the length can be anywhere from 11 - 15 characters.

This directive seems to work OK but I want to make sure there is no error in my logic.

RewriteRule ^(.+)\.(.+)\.(js|css|jpg|gif|png)$ $1.$3

Any help would be greatly

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about help