I’ll write down some examples to see if I can help you...
Example with 1 querystring
In the case of the URL www.domain.com/page-x, will be interpreted as www.domain.com/index_.php? pagename=page-x
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index_.php?pagename=$1
Explanation:
RewriteEngine On
-> Enables support for rewriting
RewriteCond %{SCRIPT_FILENAME} !-f
-> Does not apply condition for files
RewriteCond %{SCRIPT_FILENAME} !-d
-> Does not apply the condition for directories
RewriteRule ^(.*)$ index_.php?pagename=$1
-> Rewrite rule where any string (.*) after the folder, where . htaccess is, will be interpreted by index php. past the variable pagename
Example with 2 querystring (Ex.: language + page)
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)/(.*)$ site.php?lang=$1&pagename=$2
Link user request -> www.domain.com/en/products
Server-side -> www.domain.com/site.php? lang=pt&pagename=products
Example with 2 querystring (E.g.: page + sub-page)
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)/(.*)$ index.php?page=$1&subpage=$2
Link user request -> www.domain.com/page_X/subpage_Y
Server-side -> www.domain.com/index.php? page=page_X&subpage=subpage_Y