I have a current url that has query string variables. I'd like to remove them so that only the second part of the query string is visible.
From: mysite.com/posts?post=45&tab=profile
To: mysite.com/posts/45/profile
Current .htaccess file
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} \s/+access/(\S*) [NC]
RewriteRule ^ /%1 [R=301,L,NE]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/access/$1.php -f
RewriteRule ^(.+?)/?$ access/$1.php [L,NC]
SITEMAP
index.php
/access
-dashboard.php
-posts.php
-account.php
This query string will always have parameter 1, but may or may not have parameter 2, depending on what they click on the scree.