Some people want to access .php files without the extension. For example :
Accessing
example.com/user.php?id=42viaexample.com/user/42
My problem is : I don't want it. Even without any .htaccess file at all, when I go to mywebsite.com/foo it will render then serve mywebsite.com/foo.php.
How can I prevent this ?
My original problem is the following :
I want to rewrite
mywebsite.com/user/grades/foo/bartomywebsite.com/user/grades.php?user=foo&exam=bar
But, it won't work because Apache will render grades.php even without the extension. The rewrite won't work because the original URL exists.
 
    