We had a request from our library teachers to limit OPAC searches to just the local branch/school, without requiring patron log-in. The apache conf that ships with Koha has some example info that would help set up multiple virtual hosts, but I didn't want to deal with going out and changing all of our OPAC station bookmarks (hey, I'm lazy :-) )

Thanks to some help from Jared Camins on irc, we came up with the following. Adding it to the OPAC virtual host section allows us to select the branch limit based on subnet and/or IP address. Works a treat!


   RewriteCond %{REMOTE_ADDR} ^10\.61\..*
   RewriteRule ^(.*)$ - [E=OPAC_SEARCH_LIMIT:lo]

   RewriteCond %{REMOTE_ADDR} ^10\.14\..*
   RewriteRule ^(.*)$ - [E=OPAC_SEARCH_LIMIT:pi]

   RewriteCond %{REMOTE_ADDR} ^10\.9\.12\.37
   RewriteRule ^(.*)$ - [E=OPAC_SEARCH_LIMIT:es]

Hope this helps someone else!

--
Chris Hobbs
Director, Technology
New Haven Unified School District
-- This message has been checked by ESVA and is believed to be clean.