From 009d412f09b0e1727f57ce8b58ad5fec8a31d81e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 17 Apr 2017 14:20:17 -0400 Subject: [PATCH] LP#1648234 Remove Apache JSPAC redirects Remove automatic URL redirects from JSPAC URLs to TPAC URLs in the example Apache configuration files. Signed-off-by: Bill Erickson Signed-off-by: Ben Shum Signed-off-by: Galen Charlton --- Open-ILS/examples/apache/eg_vhost.conf.in | 44 ------------------- Open-ILS/examples/apache_24/eg_vhost.conf.in | 44 ------------------- .../Administration/remove-jspac-redir.adoc | 8 ++++ 3 files changed, 8 insertions(+), 88 deletions(-) create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/remove-jspac-redir.adoc diff --git a/Open-ILS/examples/apache/eg_vhost.conf.in b/Open-ILS/examples/apache/eg_vhost.conf.in index f2aba579bf..992e41fdd8 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf.in +++ b/Open-ILS/examples/apache/eg_vhost.conf.in @@ -129,50 +129,6 @@ RewriteRule . - [E=OILS_OPAC_RID:%2,E=OILS_TIME_YEAR:%{TIME_YEAR}] RewriteCond %{REQUEST_URI} ^/opac/(.*?)/ RewriteRule . - [E=locale:%1] -# ---------------------------------------------------------------------------------- -# Rewrite JSPac->TPac with redirects -# ---------------------------------------------------------------------------------- - -# First things first, extract useful data -# And we are going to start with a "this is the JSPac" check on each of these: -# RewriteCond %{REQUEST_URI} ^/?opac/ - -# Basic (overall) search type, if present -# I am cheating and grabbing RT or TP because I dunno the difference between them. -RewriteCond %{REQUEST_URI} ^/opac/ -RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])(rt|tp)=([^;&]*) -RewriteRule . - [E=OILS_JSPAC_SEARCH_TYPE:qtype=%3;] - -# Basic (overall) search term(s), if present - NOTE: Not doing advanced search. -RewriteCond %{REQUEST_URI} ^/opac/ -RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])t=([^;&]*) -RewriteRule . - [E=OILS_JSPAC_SEARCH_TERMS:query=%2;] - -# Search Location, if present -RewriteCond %{REQUEST_URI} ^/opac/ -RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])l=([^;&]*) -RewriteRule . - [E=OILS_JSPAC_SEARCH_LOCATION:locg=%2;] - -# My Account -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] - -# Record Pages -# /opac/en-US/skin/default/xml/rdetail.xml?r=32 -> /eg/opac/record/32 -RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])r=([^;&]*) -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] - -# Bookbag Pages -# /opac/extras/feed/bookbag/html-full/1 -> /eg/opac/results?bookbag=1;page=0;locg=1;depth=0 -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] - -# Search Results Pages -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] - -# Basic Search (STILL not doing advanced) -# Fallback! But only for things that end in xml, htm, or html -# Images, CSS, etc can stick around. -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] - # -----------------------------------------------------------------------------$ # Force HTTPS for /eg/circ/selfcheck # -----------------------------------------------------------------------------$ diff --git a/Open-ILS/examples/apache_24/eg_vhost.conf.in b/Open-ILS/examples/apache_24/eg_vhost.conf.in index 48c6ef0b5d..45c54248bb 100644 --- a/Open-ILS/examples/apache_24/eg_vhost.conf.in +++ b/Open-ILS/examples/apache_24/eg_vhost.conf.in @@ -120,50 +120,6 @@ RewriteRule . - [E=OILS_OPAC_RID:%2,E=OILS_TIME_YEAR:%{TIME_YEAR}] RewriteCond %{REQUEST_URI} ^/opac/(.*?)/ RewriteRule . - [E=locale:%1] -# ---------------------------------------------------------------------------------- -# Rewrite JSPac->TPac with redirects -# ---------------------------------------------------------------------------------- - -# First things first, extract useful data -# And we are going to start with a "this is the JSPac" check on each of these: -# RewriteCond %{REQUEST_URI} ^/?opac/ - -# Basic (overall) search type, if present -# I am cheating and grabbing RT or TP because I dunno the difference between them. -RewriteCond %{REQUEST_URI} ^/opac/ -RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])(rt|tp)=([^;&]*) -RewriteRule . - [E=OILS_JSPAC_SEARCH_TYPE:qtype=%3;] - -# Basic (overall) search term(s), if present - NOTE: Not doing advanced search. -RewriteCond %{REQUEST_URI} ^/opac/ -RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])t=([^;&]*) -RewriteRule . - [E=OILS_JSPAC_SEARCH_TERMS:query=%2;] - -# Search Location, if present -RewriteCond %{REQUEST_URI} ^/opac/ -RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])l=([^;&]*) -RewriteRule . - [E=OILS_JSPAC_SEARCH_LOCATION:locg=%2;] - -# My Account -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] - -# Record Pages -# /opac/en-US/skin/default/xml/rdetail.xml?r=32 -> /eg/opac/record/32 -RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])r=([^;&]*) -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] - -# Bookbag Pages -# /opac/extras/feed/bookbag/html-full/1 -> /eg/opac/results?bookbag=1;page=0;locg=1;depth=0 -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] - -# Search Results Pages -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] - -# Basic Search (STILL not doing advanced) -# Fallback! But only for things that end in xml, htm, or html -# Images, CSS, etc can stick around. -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] - # -----------------------------------------------------------------------------$ # Force HTTPS for /eg/circ/selfcheck # -----------------------------------------------------------------------------$ diff --git a/docs/RELEASE_NOTES_NEXT/Administration/remove-jspac-redir.adoc b/docs/RELEASE_NOTES_NEXT/Administration/remove-jspac-redir.adoc new file mode 100644 index 0000000000..8c43ea3e48 --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/Administration/remove-jspac-redir.adoc @@ -0,0 +1,8 @@ +Remove JSPAC Redirects +^^^^^^^^^^^^^^^^^^^^^^ +Future versions of Evergreen will no longer contain automatic redirects +from JSPAC URLs to TPAC URLs, given that the JSPAC is no longer supported. +Existing sites, however, may wish to retain JSPAC redirects in their +Apache configuration files since JSPAC URLs may still be used in the wild +to access their catalogs. + -- 2.43.2