301 redirect help for duplicate content for home page via .htacess

0

I have a .htaccess file for the purpose of directing "mysite.com" to "mysite.com", not only that but also redirect "http: //" to "https: // ", as follows:

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*) https://www.%{SERVER_NAME}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTPS} off
RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]

However, I would like to redirect 301 of all URLs with duplicate content that start with "? q=" to the "www.mysite.com" home page, so here I am asking for help to find out if this is possible, and if so how could this be done.

    
asked by anonymous 30.03.2018 / 07:08

0 answers