I am trying to write a RewriteRule
that will match files by their extension, and what I've come up with is:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^([^.]*\.less)$ ./index.php?f=$1
</IfModule>
This works fine when the only dot in the filename is the one separating the extension, but fails when there are other dots in there. For example, it won't work for hello.world.less
.
I have no clue on how to proceed from here, any help will be much appreciated. Thanks!