Post by alarsdes » Mon May 14, 2018 9:08 pm

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

Active Member

Posts

Joined
Thu Aug 25, 2011 3:36 pm

Post by MrPhil » Mon May 14, 2018 10:46 pm

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.

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by alarsdes » Tue May 15, 2018 5:25 pm

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

Active Member

Posts

Joined
Thu Aug 25, 2011 3:36 pm

Post by MrPhil » Wed May 16, 2018 11:24 pm

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.

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm
Who is online

Users browsing this forum: No registered users and 401 guests