From: Bill Erickson Date: Wed, 11 Dec 2013 16:33:33 +0000 (-0500) Subject: web staff : repair apache configuration X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=76c8a0c421fb096b2ee8857206cee1d48279545a;p=working%2FEvergreen.git web staff : repair apache configuration Location per app is no longer necessary. LocationMatch now supports arbitrary nesting. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/examples/apache/eg_vhost.conf.in b/Open-ILS/examples/apache/eg_vhost.conf.in index 45487ec704..32ebd26b02 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf.in +++ b/Open-ILS/examples/apache/eg_vhost.conf.in @@ -787,20 +787,19 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] -# TODO: as is, each sub-app will require a new Location entry, which -# will quickly grow large (and it's unnecessary and annoying). we need a -# better solution. - + Options -MultiViews - # any reuest that does not map to a template file - # is redirected to the index. This allows us to - # map multiple routes to the same application. + + # map /eg/staff to /eg/staff/index + RewriteEngine On + RewriteCond %{PATH_INFO} =/staff/ + RewriteRule (.*) /eg/staff/index [L,DPI] + + # map /eg/staff/foo/bar to /eg/staff/foo/index RewriteEngine On - RewriteCond %{PATH_INFO} !/staff/index - RewriteCond %{PATH_INFO} !/staff/t_* - RewriteRule .* /eg/staff/index [L,DPI] + RewriteCond %{PATH_INFO} !.*/(index|css|t_*) + RewriteRule (.*)/[^\/]+$ $1/index [L,DPI] - # is this redundant? Header append Cache-Control "public" @@ -814,21 +813,7 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] Header append Vary User-Agent env=!dont-vary - - - Options -MultiViews - RewriteEngine On - RewriteCond %{PATH_INFO} !/staff/cat/bucket/record/index - RewriteCond %{PATH_INFO} !/staff/cat/bucket/record/t_* - RewriteRule .* /eg/staff/cat/bucket/record/index [L,DPI] - - - Options -MultiViews - RewriteEngine On - RewriteCond %{PATH_INFO} !/staff/circ/patron/index - RewriteCond %{PATH_INFO} !/staff/circ/patron/t_* - RewriteRule .* /eg/staff/circ/patron/index [L,DPI] - + diff --git a/Open-ILS/examples/apache_24/eg_vhost.conf.in b/Open-ILS/examples/apache_24/eg_vhost.conf.in index 3e07b09cf5..1f90e8496e 100644 --- a/Open-ILS/examples/apache_24/eg_vhost.conf.in +++ b/Open-ILS/examples/apache_24/eg_vhost.conf.in @@ -799,20 +799,19 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] -# TODO: as is, each sub-app will require a new Location entry, which -# will quickly grow large (and it's unnecessary and annoying). we need a -# better solution. - + Options -MultiViews - # any reuest that does not map to a template file - # is redirected to the index. This allows us to - # map multiple routes to the same application. + + # map /eg/staff to /eg/staff/index + RewriteEngine On + RewriteCond %{PATH_INFO} =/staff/ + RewriteRule (.*) /eg/staff/index [L,DPI] + + # map /eg/staff/foo/bar to /eg/staff/foo/index RewriteEngine On - RewriteCond %{PATH_INFO} !/staff/index - RewriteCond %{PATH_INFO} !/staff/t_* - RewriteRule .* /eg/staff/index [L,DPI] + RewriteCond %{PATH_INFO} !.*/(index|css|t_*) + RewriteRule (.*)/[^\/]+$ $1/index [L,DPI] - # is this redundant? Header append Cache-Control "public" @@ -826,21 +825,7 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] Header append Vary User-Agent env=!dont-vary - - - Options -MultiViews - RewriteEngine On - RewriteCond %{PATH_INFO} !/staff/cat/bucket/record/index - RewriteCond %{PATH_INFO} !/staff/cat/bucket/record/t_* - RewriteRule .* /eg/staff/cat/bucket/record/index [L,DPI] - - - Options -MultiViews - RewriteEngine On - RewriteCond %{PATH_INFO} !/staff/circ/patron/index - RewriteCond %{PATH_INFO} !/staff/circ/patron/t_* - RewriteRule .* /eg/staff/circ/patron/index [L,DPI] - +