I'm archiving a phpBB forum into flat HTML files, without any PHP code anymore.
I used wget (see How to: Archive a phpBB forum using Wget and preserve styling), and I now have these files:
How to make Apache serve example.com/forum/viewforum.php?f=2&start=25 as a file, and not as a request to viewforum.php with a query string? The latter does not work obviously and gives a 404.
I already tried this htaccess with no success:
RemoveHandler .php .phtml .php3
RemoveType .php .phtml .php3
php_flag engine off
Note: this is how I archived the forum:
wget -m -p -np -R "*sid=*,ucp.php*,memberlist.php*,*mode=viewprofile*,*view=print*,viewonline.php*,search.php*,posting.php*" https://forums.example.com

Interesting problem indeed! force me to dig many Apache docs. In the end solution was simple i.e. to escape
?so that Apache doesn't treat?and part after that as query string.You may use this rewrite rule in your site root .htaccess:
PS:
\%3Fis escaped?so make Apache load/forum/viewforum.php?f=2&start=25as a file.