RewriteEngine ON
RewriteCond %{QUERY_STRING} locale=([^&]*)
-RewriteRule ^/opac/[^/]+/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
-<LocationMatch /opac/[^/]+/extras/slimpac/>
+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/>
AddOutputFilter INCLUDES;XMLENT .html
</LocationMatch>
RewriteRule ^/xul/ - [E=locale:%1]
RewriteRule ^/reports/ - [E=locale:%1] [L]
+# 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]
# Conify - next-generation Evergreen administration interface
# ----------------------------------------------------------------------------------
RewriteEngine on
-RewriteRule ^/conify/(.*)/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
+RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
<Location /conify>
XMLEntStripPI "yes"
XMLEntEscapeScript "no"