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

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]

 

Comments

WWW auf NON-WWW und HTTPS weiterleiten

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

HTTP auf HTTPS weiterleiten

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 

Neuen Kommentar schreiben

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

Suche

Neueste Kommentare