I would prefer to do this with mod_rewrite and SSI.
First put the path into an environment variable
RewriteCond %{IS_SUBREQ} false
RewriteRule ^(/.*\.html) /page.shtml [E:filename[E=filename:$1]
then process that in the shtml file
<!--#include virtual="$filename"-->
(parts Parts of this solution are based on a stackoverflow question : https://stackoverflow.com/questions/40133/getting-apache-to-modify-static-webpages-on-the-fly/1196832 )