Changes between Version 1 and Version 2 of Ticket #775, comment 6


Ignore:
Timestamp:
Apr 18, 2016, 11:33:23 PM (10 years ago)
Author:
Torsten Riemer

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #775, comment 6

    v1 v2  
    1616
    1717http://www.example.com/shoproot
     18
     19Fehlerhaft also dieser Teil:
     20
     21{{{
     22  ##-- redirect to www-domain, when www is missing and no subdomain given and not using an ssl-proxy
     23  #RewriteCond %{HTTP_HOST}                 !^www\. [NC]
     24  #RewriteCond %{HTTP_HOST}                 !\.(.*)\. [NC]
     25  #RewriteCond %{HTTP_HOST}                 !^localhost [NC]
     26  #RewriteRule (.*)                         http://www.%{HTTP_HOST}/$1 [R=301,L]
     27
     28  ##-- redirect to https-domain (Do not uncomment if you only have a SSL-Proxy!)
     29  #RewriteCond %{HTTPS} off
     30  #RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
     31}}}
     32
     33Nach wie vor funktioniert es aber hiermit:
     34
     35{{{
     36  # ensure www.
     37  RewriteCond %{HTTP_HOST} !^www\. [NC]
     38  RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
     39
     40  # ensure https
     41  RewriteCond %{HTTPS} off
     42  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
     43}}}