I've figured out how to write something like www.test.com/test to www.test.com/test.php. This is useful to give a simpler browsing experience and obscure the use of the PHP. However, I'd like to go farther and disallow access to www.test.com/test.php completely, and allow access only through www.test.com/test in order to prevent people from discovering the use of PHP by simply trying it in a URL.
The problem is that if I disallow access to www.test.com/test.php, then www.test.com/test no longer works, since the disallow rule is triggered after the rewrite to www.test.com/test.php is done.
Is this possible to do? Any alternative suggestions for hiding the programming language used are welcome.