# ----------------------------------------------------------------------------------
# Add the row ID (RID) and date so we can make unAPI happy
# ----------------------------------------------------------------------------------
-RewriteEngine ON
RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
-RewriteRule - - [E=OILS_OPAC_RID:%2]
-RewriteRule - - [E=OILS_TIME_YEAR:%{TIME_YEAR}] [L]
+RewriteRule . - [E=OILS_OPAC_RID:%2,E=OILS_TIME_YEAR:%{TIME_YEAR}]
# ----------------------------------------------------------------------------------
# Pull the locale from the URL
# ----------------------------------------------------------------------------------
-RewriteEngine ON
RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
-RewriteRule - - [E=locale:%1] [L]
+RewriteRule . - [E=locale:%1]
# ----------------------------------------------------------------------------------
# Configure the OPAC
AddType application/xhtml+xml .xml
</LocationMatch>
-RewriteEngine ON
RewriteCond %{QUERY_STRING} locale=([^&]*)
RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
<LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
# ----------------------------------------------------------------------------------
# Run server-side XUL and XHTML through xmlent to load the correct XML entities
# ----------------------------------------------------------------------------------
-RewriteEngine ON
RewriteCond %{HTTP:Accept-Language} ([a-z]{2}-[A-Z]{2})
RewriteRule ^/xul/ - [E=locale:%1]
-RewriteRule ^/reports/ - [E=locale:%1] [L]
+RewriteRule ^/reports/ - [E=locale:%1]
# Default to en-US if we haven't matched a locale of the form xx-YY
-RewriteEngine ON
RewriteCond %{HTTP:Accept-Language} !([a-z]{2}-[A-Z]{2})
RewriteRule ^/xul/ - [E=locale:en-US]
-RewriteRule ^/reports/ - [E=locale:en-US] [L]
+RewriteRule ^/reports/ - [E=locale:en-US]
# Default to en-US if we are just given en
-RewriteEngine ON
RewriteCond %{ENV:locale} ^$ [OR]
RewriteCond %{ENV:locale} ^en$
-RewriteRule - - [E=locale:en-US] [L]
+RewriteRule . - [E=locale:en-US]
<LocationMatch /xul/.*\.x?html$>
Options +Includes
allow from all
# Force clients to use HTTPS
- RewriteEngine On
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
</Location>
# ----------------------------------------------------------------------------------
# Conify - next-generation Evergreen administration interface
# ----------------------------------------------------------------------------------
-RewriteEngine on
RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
<Location /conify>
Options +Includes
# ----------------------------------------------------------------------------------
RedirectMatch 301 ^/vandelay/vandelay.xml(.*)$ /vandelay/en-US/vandelay.xml$1
-RewriteEngine on
RewriteRule ^/vandelay/([a-z]{2}-[A-Z]{2})/(.*)$ /vandelay/$2 [E=locale:$1]
<LocationMatch /vandelay.*xml>
</Location>
# OpenURL 0.1 searching based on OpenSearch
-RewriteEngine on
RewriteMap openurl prg:/openils/bin/openurl_map.pl
RewriteCond %{QUERY_STRING} (^.*$)
RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]