Your approach would change the data in MARC records. This should be avoided if possible. <br><br>Instead you should use Apache and possibly a proxy layer. For example, if you catalog all the records to point towards:<br>
<div style="margin-left: 40px;"><a href="http://YourContentServer.org/logical_directory1/filename9">http://YourContentServer.org/logical_directory1/filename9</a><br></div><br>You could set up a VirtualHost in Apache<br><ul>
<li>on the Koha server with ServerName "YourContentServer.org" (and NameVirtualHost) or <br></li><li>on a separate server. The DNS would control which would respond. <br></li></ul>Then for extensibility you could go further with Redirect: <br>
<div style="margin-left: 40px; font-family: courier new,monospace;">Redirect /logical_directory1 <a href="http://my_other_server.com/other_dir">http://my_other_server.com/other_dir</a><br></div>Or:<br><div style="margin-left: 40px; font-family: courier new,monospace;">
RedirectMatch ^/(logical_directory)(.)/(.)(.*) <a href="http://my_other_server.com.com/$1/$2/$3/$3$4">http://my_other_server.com.com/$1/$2/$3/$3$4</a></div><br><font size="2">That would redirect a request from: <br></font><div style="margin-left: 40px;">
<font size="2"><span style="font-family: courier new,monospace;">/logical_directory3/shakespeare.jpg</span><br></font></div><font size="2">to:<br style="font-family: courier new,monospace;"></font><div style="margin-left: 40px; font-family: courier new,monospace;">
<a href="http://my_other_server.com.com/logical_directory/3/s/shakespeare.jpg">http://my_other_server.com.com/logical_directory/3/s/shakespeare.jpg</a></div><font size="2"><br>That splits out the request to a physical directory that is hashed by the number from the logical directory and the first letter of the filename. The mappings are completely arbitrary. <br>
<br>Of course the splitting out could occur on the second (or third, fourth, etc.) server. And similar tricks could be accomplished with ModRewrite. The point is that the data should be correct without any variable substitution/interpretation. You can make that so by ensuring your servers respond to the request for that address, regardless of where the physical location endsup. <br>
<br>Just don't use a circle of redirects since the browser expects the first redirect to get to the right server. <br><br>--Joe Atzberger<br></font><br><div class="gmail_quote">On Mon, Nov 3, 2008 at 3:41 PM, Doug Dearden <span dir="ltr"><<a href="mailto:dearden@sarsf.org">dearden@sarsf.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello all,<br>
<br>
I have a successful install of Koha 3.0 (revision 17 I believe) running on<br>
Debian etch, Apache2, Mysql 5.0. In some cases we will be using this to catalog<br>
a computer file of some sort - text or maybe images or sound. I find I can get<br>
this to work by putting in the full path to the file -<br>
<a href="http://ipaddressofserver/directory/filename" target="_blank">http://ipaddressofserver/directory/filename</a>, but am trying to figure out a way<br>
to use a variable for the first part of that so that I can move the directory in<br>
the future and not have to reenter all of the links. For instance, a cataloged<br>
entry pointing to text_directory_variablename/filename is reinterpreted to<br>
<a href="http://kohaserver_ip_address/localtext/filename" target="_blank">http://kohaserver_ip_address/localtext/filename</a>. Or<br>
sound_directory_variablename is reinterpreted to<br>
<a href="http://another_web_server_ip_address/some_directory/filename" target="_blank">http://another_web_server_ip_address/some_directory/filename</a>. I have tried<br>
using some SetEnv statements in the koha-httpd.conf file and also an extra entry<br>
in the <config> section of the koha-conf.xml file, but these did not work - the<br>
link shows up without reinterpreting the variable name. At this point the best<br>
I have been able to do is to use <a href="http://kohaserver/a_directory/filename" target="_blank">http://kohaserver/a_directory/filename</a> and then<br>
create a DNS entry for the kohaserver that points to the correct IP address. My<br>
concern is looking toward the future, and trying to make things as flexible as<br>
possible - so that these files could be moved later and the only change to make<br>
it work would be reconfiguring what the variable points to.<br>
<br>
Writing this I am thinking that there is probably not code in Koha to<br>
automatically do this, but not being a perl programmer I am not sure where I<br>
would start looking. If a code modification is what it would take, a little<br>
bird dogging to the right place would help me also.<br>
<br>
Thanks,<br>
<br>
Doug<br>
<br>
_______________________________________________<br>
Koha mailing list<br>
<a href="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</a><br>
<a href="http://lists.katipo.co.nz/mailman/listinfo/koha" target="_blank">http://lists.katipo.co.nz/mailman/listinfo/koha</a><br>
</blockquote></div><br>