In the case you've described, your rewrite-rule would look something
like this (not tested):
RewriteRule ^/(*)$ /index.php?page=$1
In other words, in the original URL match everything after the / and
call it $1. Then in your re-written URL you just use the $1 to
represent the pattern that was matched.