This is what I have so far:
RewriteRule ^([A-Za-z0-9_]*)/?$ index.php?page=$1 [NC]
RewriteRule ^([A-Za-z0-9_]*)/([A-Za-z0-9_]*)/?$ index.php?page=$1/$2 [NC]
I guess my solution will be the most empirical one but it worked:
RewriteEngine On
RewriteBase /
RewriteRule ^([a-z0-9-]+)$ /?page=$1 [NC,L]
RewriteRule ^([a-z0-9-]+)/([a-z0-9-]+)$ /?page=$1&action=$2 [NC,L]
That will translate http://example.com/?page=contact&action=send to http://example.com/contact/send My page values were only alphanumeric and contain minus sign as word separator but you can replace the values to match whatever you need.
And, of course you need to prefix all of your js, css, img directories with a slash in the pages. So css/style.css would be /css/style.css or use absolute url.