ArsDigita Archives
 
 
   
 
spacer

ArsDigita Redirecte

Part of the ArsDigita Server Architecture

This page was last updated on December 19, 1999


What do you do when you need to migrate a service from one server to another? Use Redirecte. By simply entering information about the old host, the new host and a description of the service, you can have Redirecte redirect requests for the old host to either a fixed URL on the new host or to the requested URL. For example, if you move the content of foo.arsdigita.com to the server named foo.com, you can use Redirecte to redirect requests for http://foo.arsdigita.com/path/to/service.adp?a=b&c=d to http://foo.com/path/to/service.adp?a=b&c=d. Or if you'd rather, you can direct all requests for http://foo.arsdigita.com/ to the single URL http://foo.com/welcome-to-foo-dot-com.html

Redirecte works by retrieving the host field in the incoming request header and using that to look up the proper redirect target. If the hostname in the incoming request is blank or if it does not have an entry in the redirecte list, then the user will be shown a list of available services as defined in the redirecte list. If that list contains a single entry, then the user will be automatically redirected to that target instead of being shown the list.

Installing ArsDigita Redirecte

Redirecte runs on AOLserver 2.x and AOLserver 3.x

  • Download redirecte.tar.gz and extract the contents into a server's tcl library root.

  • If you are using AOLserver 2.x, edit your AOLserver configuration and make sure that this is set:
    [ns/server/server-name]
    EnableTclPages=off

  • Edit four procs defined in redirecte-defs.tcl:
    • redirecte_hosts - Add an entry for each host. An entry looks like this: [list hostname target description].
      • hostname: the name of the (old) server running on the Redirecte host (e.g. foo.arsdigita.com, bar.arsdigita.com:8000)
      • target: the URL (including hostname) on the new server (e.g. http://foo.com, http://bar.com:8000/welcome.html). If this is simply a hostname without a trailing slash, the incoming request will be appended. For example, if the target is set to http://foo.com and the incoming request is for http://foo.arsdigita.com/get/this.adp?args=Something, then the browser will be redirected to http://foo.com/get/this.adp?args=Something.
      • description: the text that will appear on the list of servers page for this hostname. This is used for browsers that do not send the host header or for requests to hosts that do not have entries defined.
    • redirecte_title - Title for the "list of servers" page
    • redirecte_mesg - Message for the "list of servers" page (can be HTML)
    • redirecte_foot - Footer for the "list of servers" page (can be HTML)

Known Problems

  • There are no known problems with Redirecte.

abe@arsdigita.com and brucek@arsdigita.com
spacer