How to use a different filename extension for output, e.g. *.php?
Use the power of the Cocoon sitemaps. There is default handling for *.php (see main/webapp/sitemap.xmap) to map the ‘php’ extension to an internal request for “html”. See more about PHP below. Use the same internal re-direction technique for your special needs, e.g. copy that php match to your project sitemap and use “.htm” instead.