Helpful Information
Category: mod_rewrite
mod_rewrite -> file

How do you set up mod_rewrite (on apache2) to append .php to a url if the file exists? I've tried

RewriteEngine On
RewriteCond %{REQUEST_URI}.php -f
RewriteRule ^(.*)$ $0.php

But that doesn't work

take a look at THIS ( link.. not only is it about mod rewrite but it also has lots of links to other references within the post about mod rewrite.

Sir P

Thanks, but I can't see anything relating to what I want. TBH, I don't see why my previous method doesn't work. It should (or am I missing something.)