I just came across this: http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html --> check under "removing the query string". It states: "On many sites, the page will be displayed for both page.html and page.html?anything=anything, which hurts your SEO with duplicate content. An easy way to fix this issue is to redirect external requests containing a query string to the same uri without the query_string."
My question is... how do you test it? I added the code below:
RewriteCond %{THE_REQUEST} ^GET\ /.*\;.*\ HTTP/
RewriteCond %{QUERY_STRING} !^$
RewriteRule .* http://www.mysite.com%{REQUEST_URI}? [R=301,L]
RewriteCond %{THE_REQUEST} ^GET\ /.*\;.*\ HTTPS/
RewriteCond %{QUERY_STRING} !^$
RewriteRule .* https://www.mysite.com%{REQUEST_URI}? [R=301,L]
However, if I go to www.mysite.com/?anything=bla, it still shows this link in the address bar? Did I misunderstand, or was this code not suppose to redirect to mysite.com without the query string?
Also, am I right by making one for HTTP and one for HTTPS?