From e8cf82d0ddb13dfbcbf96bf7528ce34e9574c0d1 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 5 Sep 2018 15:58:23 -0400 Subject: [PATCH] LP#1775466 Angular Apache configuration updates Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- Open-ILS/examples/apache/eg_vhost.conf.in | 31 ++++++++++++++++++++++++++++ Open-ILS/examples/apache_24/eg_vhost.conf.in | 30 +++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/Open-ILS/examples/apache/eg_vhost.conf.in b/Open-ILS/examples/apache/eg_vhost.conf.in index 501b5e2f39..f32e6fc9a7 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf.in +++ b/Open-ILS/examples/apache/eg_vhost.conf.in @@ -826,3 +826,34 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] # and you will suffer a performance hit. #RewriteCond %{HTTPS} off #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L] + + +# ------------------------------------------------------------------------ +# /eg2/ client setup and locale configuration. +# +# If a valid locale cookie is present that does not match the current +# path, redirect to the requested locale path. +# Otherwise, if no locale is active, redirect to the default locale. + +# fr-CA +#RewriteCond %{REQUEST_URI} ^/eg2/ +#RewriteCond %{REQUEST_URI} !^/eg2/fr-CA/ +#RewriteCond %{HTTP_COOKIE} eg_locale=fr_ca +#RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/fr-CA/$1 [R=307,L] + +# Default / en-US. +# No alternate supported cookie provided. +RewriteCond %{REQUEST_URI} ^/eg2/ +RewriteCond %{REQUEST_URI} !^/eg2/([a-z]{2}-[A-Z]{2})/ +RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/en-US/$1 [R=307,L] + +# en-US build +# This is the only required configuration when only using the default locale. + + FallbackResource /eg2/en-US/index.html + + +# fr-CA build +# +# FallbackResource /eg2/fr-CA/index.html +# diff --git a/Open-ILS/examples/apache_24/eg_vhost.conf.in b/Open-ILS/examples/apache_24/eg_vhost.conf.in index 73d6239222..cfeb27ed34 100644 --- a/Open-ILS/examples/apache_24/eg_vhost.conf.in +++ b/Open-ILS/examples/apache_24/eg_vhost.conf.in @@ -823,3 +823,33 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] # and you will suffer a performance hit. #RewriteCond %{HTTPS} off #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L] + +# ------------------------------------------------------------------------ +# /eg2/ client setup and locale configuration. +# +# If a valid locale cookie is present that does not match the current +# path, redirect to the requested locale path. +# Otherwise, if no locale is active, redirect to the default locale. + +# fr-CA +#RewriteCond %{REQUEST_URI} ^/eg2/ +#RewriteCond %{REQUEST_URI} !^/eg2/fr-CA/ +#RewriteCond %{HTTP_COOKIE} eg_locale=fr_ca +#RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/fr-CA/$1 [R=307,L] + +# Default / en-US. +# No alternate supported cookie provided. +RewriteCond %{REQUEST_URI} ^/eg2/ +RewriteCond %{REQUEST_URI} !^/eg2/([a-z]{2}-[A-Z]{2})/ +RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/en-US/$1 [R=307,L] + +# en-US build +# This is the only required configuration when only using the default locale. + + FallbackResource /eg2/en-US/index.html + + +# fr-CA build +# +# FallbackResource /eg2/fr-CA/index.html +# -- 2.11.0