]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/jspac_redirects.conf
LP1825851 Add Perl HTML::Defang dependency
[working/Evergreen.git] / Open-ILS / examples / jspac_redirects.conf
1 # ----------------------------------------------------------------------------------
2 # Apache RewriteRule's for redirecting old-school JSPAC URLs to TPAC URLs.
3 # To use these redirects, add them to eg_vhost.conf, typically found at
4 # /etc/apache2/eg_vhost.conf
5 # See also https://bugs.launchpad.net/evergreen/+bug/1648234
6 # ----------------------------------------------------------------------------------
7
8 # Basic (overall) search type, if present
9 # I am cheating and grabbing RT or TP because I dunno the difference between them.
10 RewriteCond %{REQUEST_URI} ^/opac/
11 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])(rt|tp)=([^;&]*)
12 RewriteRule . - [E=OILS_JSPAC_SEARCH_TYPE:qtype=%3;]
13
14 # Basic (overall) search term(s), if present - NOTE: Not doing advanced search.
15 RewriteCond %{REQUEST_URI} ^/opac/
16 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])t=([^;&]*)
17 RewriteRule . - [E=OILS_JSPAC_SEARCH_TERMS:query=%2;]
18
19 # Search Location, if present
20 RewriteCond %{REQUEST_URI} ^/opac/
21 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])l=([^;&]*)
22 RewriteRule . - [E=OILS_JSPAC_SEARCH_LOCATION:locg=%2;]
23
24 # My Account
25 RewriteRule /opac/[^/]*/skin/default/xml/myopac.xml /eg/opac/myopac/main?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
26
27 # Record Pages
28 # /opac/en-US/skin/default/xml/rdetail.xml?r=32 -> /eg/opac/record/32
29 RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])r=([^;&]*)
30 RewriteRule /opac/.*/rdetail.xml /eg/opac/record/%2?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
31
32 # Bookbag Pages
33 # /opac/extras/feed/bookbag/html-full/1 -> /eg/opac/results?bookbag=1;page=0;locg=1;depth=0
34 RewriteRule /opac/extras/feed/bookbag/html-full/(\d*) /eg/opac/results?bookbag=$1;%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
35
36 # Search Results Pages
37 RewriteRule /opac/[^/]*/skin/[^/]*/xml/rresult.xml /eg/opac/results?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
38
39 # Basic Search (STILL not doing advanced)
40 # Fallback! But only for things that end in xml, htm, or html
41 # Images, CSS, etc can stick around.
42 RewriteRule /opac/[^/]*/skin/.*(xml|htm|html|/)$ /eg/opac/home?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
43