From 58cef3f69b7b718a8d9efeb2a102613ead7b1f06 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Oliver=20B=C3=B6ttcher?= Date: Thu, 6 Apr 2017 12:27:47 +0200 Subject: [PATCH] ODT - opencms rewrites --- .../cms-odt-daimler-com.pixelpark.net.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/customer/mbvd-odt/cms-odt-daimler-com.pixelpark.net.yaml b/customer/mbvd-odt/cms-odt-daimler-com.pixelpark.net.yaml index d0421ba1..cd2ac6b5 100644 --- a/customer/mbvd-odt/cms-odt-daimler-com.pixelpark.net.yaml +++ b/customer/mbvd-odt/cms-odt-daimler-com.pixelpark.net.yaml @@ -34,10 +34,10 @@ infra::profile::apache::pp_vhosts: - cms-odt-daimler-com.pixelpark.net ssl: false rewrites: -# - opencms_to_slash: -# comment: '/opencms# to /' -# rewrite_rule: -# - '^/opencms/(.*)$ /$1 [R,L]' + - opencms_to_slash: + comment: '/opencms to /' + rewrite_rule: + - '^/opencms(/)?$ / [R,L]' - https: comment: 'all to https' rewrite_cond: @@ -75,6 +75,16 @@ infra::profile::apache::pp_vhosts: - '%%{ich-trickse}{REQUEST_URI} !^/(opencms|resources|export|skins|genImages|genImagesTemp|fonts)' rewrite_rule: - '^(.*)$ http://localhost:8081/opencms$1 [P,L]' + - proxy_non_https_fix: + rewrite_cond: + - '%%{ich-trickse}{HTTP:HTTPS} !=on [NC]' + rewrite_rule: + - '^/opencms/(.*)$ http://localhost:8080/opencms/$1 [P,L]' + - proxy_https_fix: + rewrite_cond: + - '%%{ich-trickse}{HTTP:HTTPS} =on [NC]' + rewrite_rule: + - '^/opencms/(.*)$ http://localhost:8081/opencms/$1 [P,L]' proxy_preserve_host: true directories: - access-control-fonts: -- 2.39.5