Nevermind, I found the solution:
RewriteCond %{QUERY_STRING} ^str=([^&]+)&submit=Search$
RewriteRule ^(.*)$ /index.php?s=%1 [L]
RewriteCond %{QUERY_STRING} ^str=([^&]+)&submit=Tag$
RewriteRule ^(.*)$ /index.php?tag=%1 [L]
Yes, I understand it will get fixed, I’m just asking if anyone knows how to modify the mod_rewrite rules so that it will work correctly.