I was able to do this by learning from WordPress' mod_rewrite(s) and
use variants of:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [S=39]
RewriteRule ^(.+[^\.])/?$ /index.php?page=$1 [QSA,L]
"index.php" is the hidden script that does the work behind the scenes.
another version:
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [S=39]
RewriteRule ^([\w]+\-.*\.php)$ display.php?page=$1 [QSA,L]
"display.php" is the hidden script working behind the scenes.
The trick is to get the REGEX inside the parenthesis to match what you
are looking for. You'll probably have better luck with the first, as
the second looks for "file names" containing dashes.
Then, inside PHP, use functions to break apart and identify the query.
>> Stay informed about: reverse mod_rewrite