To make your RewriteRule strip the query string, simply append a ? to the end of the rewrite path, eg:
PLAIN TEXT
CODE:
# redirect all requests to a subfolder to the home page
# strips query string
RewriteEngine On
RewriteBase /
RewriteRule ^subfolder/.*$ /index.php? [L,R=301]
More Reading:Htaccess Force SSL with Redirect (Non Standard SSL Port Compatible)