W3C home > Mailing lists > Public > www-talk@w3.org > November to December 1995

Re: server redirects by client domain

From: Michael Niksch <nik@zurich.ibm.com>
Date: Thu, 14 Dec 1995 17:44:04 +0100
Message-Id: <9512141744.ZM38966@zurich.ibm.com>
To: www-talk@w3.org
With the CERN server you could probably map everything to a CGI script

  Exec    /cgi-bin/*      /usr/local/httpd/cgi-bin/*
  Map     /*              /cgi-bin/redirect/*

The /usr/local/httpd/cgi-bin/redirect script would look like

#!/bin/ksh
case "$REMOTE_HOST" in
*.au | *.nz | *.jp | *.kr )
  url="http://Bond.edu.au/External/Misc/apache${PATH_INFO}"
  ;;
*.at | *.de | *.dk )
  url="http://iuinfo.tuwien.ac.at/apache${PATH_INFO}"
  ;;
* )
  url="http://sunsite.doc.ic.ac.uk/packages/apache${PATH_INFO}"
  ;;
esac
print "$Location: $url"
print "Content-Type: text/html"
print
print "<HTML><HEAD><TITLE>Redirect</TITLE></HEAD><BODY>"
print "<A HREF=\"$url\">Click here!</A>"
print "</BODY></HTML>"

-- 
Michael Niksch                      TEL: +41-1-7248-913
IBM Zurich Research Laboratory      FAX: +41-1-7240904
Saeumerstrasse 4                    nik@zurich.ibm.com (NIK at ZURICH)
CH-8803 Rueschlikon / Switzerland   http://www.zurich.ibm.com/~nik/
Received on Thursday, 14 December 1995 11:44:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:18 GMT