Mod_rewrite and urls that don't end with .php
- by Kevin Laity
I'm trying to use Mod_rewrite to hide the .php extensions of my pages.
However, it refuses to do any rewriting unless the input url ends with .php, which makes that impossible. I can confirm that rewriting works fine as long as the url has .php at the end.
RewriteRule a\.php b\.php
Works, while
RewriteRule a\.html b\.html
does not.
How can I turn off this behavior and allow it to rewrite all urls? I'm on a shared host so whatever I do has to be done from a .htaccess file.
Update:
There seems to be some confusion about what I'm asking here. The question is not about how to write the rule, the question is about server configuration. The rule I'm using is fine, I can test that locally. But the server I'm working with is somehow configured so that mod_rewrite doesn't attempt to rewrite anything that doesn't end with .php