When i use the following rule declaration:
RewriteRule ^foo foo.php
when I visit localhost/foo
it sucessfully displayes foo.php
, but when I visit localhost/foofake
or localhost/fooanythingelse
, it still displays foo.php. How to prevent this and display a 404 error page instead?
PS: I am aware of this question But what I am trying to do here is different.