Skip to content

.htaccess

##
# Uncomment the following lines to remove "www." from the domain:
#
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
#
# Uncomment the following lines to add "www." to the domain:
#
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+)$
RewriteRule ^ http://www.%1%{REQUEST_URI} [R=301,L]
#
# Aufruf über HTTPS
#
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
##

Unterschied?

<IfModule mod_rewrite.c>
RewriteEngine On
##
# Uncomment the following lines to remove "www." from the domain:
#
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
#
# Uncomment the following lines to add "www." to the domain:
#
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+)$
RewriteRule ^ http://www.%1%{REQUEST_URI} [R=301,L]
#
# Aufruf über HTTPS
#
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
##
</IfModule>