</IfModule>
</Location>
-# 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.
-<Location /eg/staff/>
+<LocationMatch /eg/staff/>
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?
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IFModule>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
-</Location>
-<Location /eg/staff/cat/bucket/record/>
- 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]
-</Location>
-<Location /eg/staff/circ/patron/>
- 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]
-</Location>
+</LocationMatch>
<Location /js/>
<IfModule mod_headers.c>
</IfModule>
</Location>
-# 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.
-<Location /eg/staff/>
+<LocationMatch /eg/staff/>
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?
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IFModule>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
-</Location>
-<Location /eg/staff/cat/bucket/record/>
- 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]
-</Location>
-<Location /eg/staff/circ/patron/>
- 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]
-</Location>
+</LocationMatch>
<Location /js/>
<IfModule mod_headers.c>