There are several ways of doing this.
- Using mod_rewrite - this is cited everywhere - just search for it
- Configure Apache (with .htaccess or something else) to treat files which don't end in .php as PHP anyway, for example:
<Files sitemap>
ForceType application/x-httpd-php
</Files>
Would force the file "sitemap" to be treated as a PHP script even though it doesn't end in .php.
You can also make any extension behave as .php by doing something like:
# Make all .xxx files served by PHP
AddType application/x-httpd-php .xxx
In httpd.conf (may also work in .htaccess)
In any case, you'll want to make sure that you have expose_php=Off in your php.ini (or configured somewhere, anyway) otherwise PHP will spit out
X-Powered-by:PHP-something
In the HTTP headers, also it will serve some images of logos and a small dog when certain "magic" query strings are sent
(for example /info.php?=PHPE9568F36-D428-11d2-A769-00AA001ACF42 )
Mark