Page 1 of 1

http / https issue

Posted: Mon May 14, 2018 9:08 pm
by alarsdes
hoe kan ik simpel oplossen dat het volgende probleem wordt opgelost
Als ik mijn pagina
https://www.112ink.nl
test voor seo bij https://sitechecker.pro/nl
krijg ik de volgende "kritische Error".
HTTP en HTTPS protocollen werken apart en geven dezelfde pagina-inhoud weer
Dit moet op de een of andere manier bij de htaccess op te lossen zijn. Maar ik zoek nu al een halve dag maar krijg deze melding niet weg.
Ik heb de volgende condities in de htaccess
#www resolve
RewriteCond %{HTTP_HOST} ^112ink.nl [NC]
RewriteRule ^(.*)$ https://www.112ink.nl/$1 [L,R=301]

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

Maar deze werken schijnbaar niet
Weet iemand voor mij een oplossing
Bijvoorbaat dank
Ton

Re: http / https issue

Posted: Mon May 14, 2018 10:46 pm
by MrPhil
Try changing

Code: Select all

#www resolve
RewriteCond %{HTTP_HOST} ^112ink.nl [NC]
RewriteRule ^(.*)$ https://www.112ink.nl/$1 [L,R=301]

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
to

Code: Select all

#force www and https
RewriteEngine On
RewriteCond  %{HTTPS}  !on  [OR]
RewriteCond  %{HTTP_HOST}  !^www\. [NC]
RewriteRule  ^(.*)$  https://www.112ink.nl/$1 [R=301,L]
and see if it helps.

You can omit the RewriteEngine On command if you already have that somewhere above. You were changing it back to http in the second command, and in the first, L (leave) before setting the status code may be causing problems.

Re: http / https issue

Posted: Tue May 15, 2018 5:25 pm
by alarsdes
Thank you It worked.
I use this

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

#www resolve
RewriteCond %{HTTP_HOST} ^112ink.nl [NC]
RewriteRule ^(.*)$ https://www.112ink.nl/$1 [L,R=301]

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

Now I get two other error messages
These two new messages I only get testing SEO for products. Not when I test SEO for categories
like
Page URL is not case sensitive
and
Ending slash redirects not configurate correctly.

Do you know a remedy

Re: http / https issue

Posted: Wed May 16, 2018 11:24 pm
by MrPhil
You're still turning SSL on in one place, and then turning it off in the following place! Please fix, and then see if you still have trouble. You also add "www." (if missing) in two places, and you have a (default) 302 status code on the first redirect. Please learn how .htaccess URL rewrites work before doing any further work.