LP1522686: Force SSL for Web Staff, Add Basic Redirect for Staff URL
[Evergreen.git] / Open-ILS / examples / apache_24 / eg_vhost.conf.in
index 78fab7e..94d5c34 100644 (file)
@@ -9,6 +9,11 @@
 RedirectMatch 301 ^/$ /eg/opac/home
 
 # ----------------------------------------------------------------------------------
+# Redirect staff to the correct URL if they forget to include the final /
+# ----------------------------------------------------------------------------------
+RedirectMatch 301 ^/eg/staff$ /eg/staff/
+
+# ----------------------------------------------------------------------------------
 # Point / to the IP address redirector
 # ----------------------------------------------------------------------------------
 #<LocationMatch ^/$>
@@ -818,6 +823,9 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
     Options -MultiViews
     PerlSetVar OILSWebStopAtIndex "true"
 
+    RewriteCond %{HTTPS} off
+    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
+
     # sample staff-specific translation files
     #PerlAddVar OILSWebLocale "en_ca"                                           
     #PerlAddVar OILSWebLocale "/openils/var/data/locale/staff/en-CA.po"