.htaccess: HTTP -> HTTPS & WWW -> NON-WWW

Submitted by Gast (nicht überprüft) on Mi, 03/28/2018 - 22:18

Beginn von .htaccess:

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

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

 

Neuen Kommentar schreiben

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.