]> Frank Brehm's Git Trees - pixelpark/hiera.git/commitdiff
nissan rewrite all domains without www
authorAndreas Gerstenberg <gerstenberg@pixelpark.com>
Wed, 23 May 2018 11:33:57 +0000 (13:33 +0200)
committerAndreas Gerstenberg <gerstenberg@pixelpark.com>
Wed, 23 May 2018 11:33:57 +0000 (13:33 +0200)
customer/nissan/web-nissan-meinedaten-de.pixelpark.net.yaml

index 209cab8aa93db39bb4f45dfaf442268c7812c236..8048e320ab1d42b9698b0f2ccd79135bd03156b2 100644 (file)
@@ -37,11 +37,17 @@ infra::profile::apache::pp_vhosts:
         addhandlers:
           - { handler: "proxy:unix:/var/run/php5-fpm-nissan.sock|fcgi://./" , extensions: '.php' }
     rewrites:
+      - comment: 'umleiten auf www'
+        rewrite_cond:
+          - '%{literal("%")}{HTTP_HOST} !^www\.' [NC]
+          - '%{literal("%")}{HTTP_HOST} !^$'
+        rewrite_rule:
+          - ^(.*)$ https://www.%{literal("%")}{HTTP_HOST}$1 [R=301,L]
       - comment: 'Alles auf https umleiten.'
         rewrite_cond:
           - '%{literal("%")}{HTTPS} !=on'
         rewrite_rule:
-          - ^(.*)$ https://%{literal("%")}{HTTP_HOST}$1 [R=302,L]
+          - ^(.*)$ https://%{literal("%")}{HTTP_HOST}$1 [R=301,L]
 #      - comment: 'Rewrite / to soon'
 #        rewrite_rule:
 #          - '^/$ https://%{literal("%")}{HTTP_HOST}/soon [R=302,L]'