From: Andreas Gerstenberg Date: Wed, 23 May 2018 11:33:57 +0000 (+0200) Subject: nissan rewrite all domains without www X-Git-Tag: v0.1.0~960 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=bb2b517872b237d3e9042d0213b722cfc39f10d5;p=pixelpark%2Fhiera.git nissan rewrite all domains without www --- diff --git a/customer/nissan/web-nissan-meinedaten-de.pixelpark.net.yaml b/customer/nissan/web-nissan-meinedaten-de.pixelpark.net.yaml index 209cab8a..8048e320 100644 --- a/customer/nissan/web-nissan-meinedaten-de.pixelpark.net.yaml +++ b/customer/nissan/web-nissan-meinedaten-de.pixelpark.net.yaml @@ -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]'