im trying to append .htm extension to url that dont have any extension, but i dont have any results
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME}\.htm -f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ $1.htm [R=301,L]
any tip?
Thank you
$1 is for groups, what you need is something like this:
but to match paths without the extension you need change the expression to something more close to your reality. for example this:
d is a extension or not? maybe the right expression is ^([^.]+)$ to find any path without the . character.