Why do you publish data to access your server? Are you crazy?
Try this for your question. Not tested, but should work:
RewriteCond %{QUERY_STRING} (.*)\?(.*)$
RewriteRule ^(.*)$ $1\?%1%2 [R=301,L,NE]
RewriteCond %{QUERY_STRING} !=""
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)$ $1%1...