| | 18 | |
| | 19 | Fehlerhaft 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 | |
| | 33 | Nach 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 | }}} |