Website: mesolithico.freecluster.eu
(No error message)
In order to avoid duplicate content as warned about by Google search console, I have managed to redirect all http requests to https using the .htaccess-code from the helpcenter. For the same reason I need to redirect all www-requests to non-www-requests too. I added a rule to the .htaccess-file, this rule only works for the main-page www.mesolithico.freecluster.eu but not for all other pages even not for www.mesolithico.freecluster.eu/index.php (or any other subpage). I guess I need to add a wildcard behind the rewriteCond, but I don´t know exactly which one (I tried many and they don´t work)
This is my .htaccess now:
RewriteEngine On
original code provided by infinityfree helpcenter
RewriteCond %{HTTP:X-Forwarded-Proto} !https [OR]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
this rewrite only works on the main site indexpage:
RewriteCond %{HTTP_HOST} www.mesolithico.freecluster.eu
RewriteRule ^/?$ https://mesolithico.freecluster.eu [R=301,L]
Anybody knows how I can make every www-request for every page redirected to non-www?
Thanks!