[ic] Redirecting Based on Domain

Ed LaFrance interchange-users@interchange.redhat.com
Wed Jan 2 19:55:01 2002


Quoting Michael Stearne <mstearne@mac.com>:

> 
> On Wednesday, January 2, 2002, at 07:14 PM, Jim Balcom wrote:
> 
> > On Wed, 2 Jan 2002 cfm@maine.com wrote:
> >
> >>> You might be able to CNAME all the subdomains and straighten out
> the
> >>> mess in IC on the first page.
> >
> > That requires that they are running their own DNS stuff, and I have
> a
> > nagging feeling that many people here have no idea what DNS stands 
> > for, let
> > alone how to manage a DNS.
> >
> 
> Actually, I do have access to DNS so it is ok for me, luckily. But 
> the idea is to have a way that goes no lower than Apache and have it 
> handled at Interchange if possible.  I am trying to do it with 
> VirtualHosts in Apache at the present though.
> 

Another rather primitive, but effective, method would be a meta tag:

<meta http-equiv="refresh" content="0;URL=http://www.whatever.com/foo/bar.html">

You can also use a javascript onLoad event in the <BODY> tag; when I employ 
these kind of redirects I usually use both methods (redundantly, in the same 
file) as different browsers/platforms can be quite uneven with compliance on 
these matters:

<BODY onLoad="javascript:location.href='http://www.whatever.com/foo/bar.html';">

- Ed L.

===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================