Redirects for Millennium/Sierra/Legacy Catalog
You may have several hundred links pointing to your Millennium/Sierra/Legacy catalogs that you would like redirected to Primo. This article includes some ideas about how you might accomplish redirecting legacy catalog links to Primo.
Step-by-step guide: Apache Redirect
This setup presumes you will be pointing your legacy catalog domain (e.g., catalog.example.edu) to a server that will have the following Apache configuration using Apache virtual hosts:
- Find and edit your Apache Virtual Hosts configuration. In Ubuntu, this may be found under /etc/apache2/sites-available/000-default.conf.
Example configuration:
#Turn on RewriteEngine
RewriteEngine on
#redirect permanent URLs, e.g., catalog.example.edu/record=b9999999, to Xerxes, where they will redirect to Primo. Be sure to edit yourinst to include your actual Xerxes URL
RewriteRule "^/record=(.+)" "http://library.calstate.edu/yourinst/books/record?id=$1" [R,L]
#If URL contains a searcharg query string, put the query string into a Primo URL as searchable keyword.
#Note this Primo URL limits the results to only items available at the institution and does not search Primo Central. This URL uses Northridge (UNO) as an example - be sure to modify the base URL, vid, and facet values to suit your institutional parameters
RewriteCond %{QUERY_STRING} searcharg=(.*)$ [NC]
RewriteRule ^/search(.*) https://csun-primo.hosted.exlibrisgroup.com/primo-explore/search?search_scope=EVERYTHING&vid=01CALS_UNO&facet=tlevel,include,available$$I01CALS_UNO&tab=everything&offset=0&query=any,contains,%1 [L,QSA,NE,NC]
#This is a catchall - anything catalog pattern not matching the above will redirect to a generic Primo search screen. This URL uses Northridge (UNO) as an example - be sure to modify the base URL, vid, and facet values to suit your institutional parameters
RewriteRule ^(.*)$ https://csun-primo.hosted.exlibrisgroup.com/primo-explore/search?search_scope=EVERYTHING&vid=01CALS_UNO&facet=tlevel,include,available$$I01CALS_UNO&tab=everything&offset=0 [L,QSA,NE,NC]
Alternative method: PHP Redirect
Thanks for Ian Chan (Unlicensed) for sharing this example script from San Marcos!
PHP URL Redirect Script (San Marcos)
Related articles