Spent a lot of time reading the Apache docs to work all this out...
But pretty sure this is exactually what you want 🙂
In your Htaccess file or http conf file... write:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ([/]+.(htm|html))$ index.php?page=$1 [L]
What this does is the following:
First two lines are given...
Next RewriteCond checks if the requested URL exists, if it does then it goes to that URL. (i.e. if you have a file there that exists go strait to it)
* The RewriteRule uses a reg expression to determine if it should be processed. In the code I've given it checks that the URL does not contain a "/" (I only wanted it to work for the root), and then ends with a ".htm" or ".html". If this is true it sends the requested URL file name to the "index.php?page=" query string.
This is completely transparent.
All other examples that I've seen are FAR less efficent than this, and make use of many many lines to do it... PHP Builder has an article that does something similar, while not using the mod_rewrite, this is far less elegant though.
Hope it works out.