Zur Navigation

Webmaster-Tools-Google [2]

11 Jörg Kruse

Jetzt ist es OK: wenn man die URL mit http://www. vorne im Browser aufruft, wird man auf die https://www. URL weitergeleitet, und das mit einem Status Code 301:

HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=iso-8859-1
Content-Length: 253
Connection: keep-alive
Keep-Alive: timeout=15
Date: Wed, 13 Sep 2017 13:52:29 GMT
Server: Apache
Location: https://www.fahrrad-workshop-sprockhoevel.de/
Cache-Control: max-age=172800
Expires: Fri, 15 Sep 2017 13:52:29 GMT

RewriteEngine on und RewriteBase ist doch auch erforderlich oder?

Ja, die braucht es halt einmal pro .htaccess Datei, in der mod_rewrite verwendet wird

Eine Kleinigkeit habe ich aber noch zu meckern :) Dieses Tag:

</IfModule>

... sollte weiter oben stehen und nur die ExpiresByType Direktiven einschließen

<IfModule mod_expires.c>
 ExpiresActive On
 ExpiresByType text/css "access plus 2 days"
 ExpiresByType text/javascript "access plus 2 days"
 ExpiresByType text/html "access plus 2 days"
 ExpiresByType text/htm "access plus 2 days"
 ExpiresByType application/javascript "access plus 2 days"
 ExpiresByType image/gif "access plus 2 days"
 ExpiresByType image/jpeg "access plus 2 days"
 ExpiresByType image/jpg "access plus 2 days"
 ExpiresByType image/png "access plus 2 days"
 ExpiresByType image/x-icon "access plus 2 days"
</IfModule>

Falls mod_expires nicht geladen ist, können die mod_rewrite Direktiven ja trotzdem ausgeführt werden.

13.09.2017 16:00 | geändert: 13.09.2017 16:01

1 Forenmitglied fand diesen Beitrag gut

Zum Schreiben einloggen

Beitrag schreiben (als Gast)

Die Antwort wird nach der Überprüfung durch einen Moderator freigeschaltet.





[BBCode-Hilfe]