[thelist] 2 Domain Names, 1 Host?

Michiel Trimpe mtrimpe at dds.nl
Wed, 1 Dec 1999 21:40:05 +0100


And if you want to do it real cheap just get the new domain hosted with
hypermart.net ( free ) and then take this index.cgi :

#!/usr/bin/perl
print "Content-type: text/html\nLocation:
http://www.mydomain.com/subdir\n\n" ;

Now isn't that easy.

----- Original Message -----
From: Ben Vigil <ben@abelware.com>
To: <thelist@lists.evolt.org>
Sent: Wednesday, December 01, 1999 8:38 PM
Subject: Re: [thelist] 2 Domain Names, 1 Host?


> Leo:
>
> In addition to what Jeremy mentioned, here are 2 more suggestions...
>
> 1) Your ISP could also set this up for you. This is usually called a
> FakeIP.
>
> 2) But, assuming the hosting provider allows you CGI script access in
> your document root directory, you could write a quick index.cgi to do
> the redirection. This is what the file would look like:
>
> ---
> #!/usr/bin/perl
>
> my ($URL1) = 'http://www.wiedersheim.com/clicktech/index.html';
> my ($URL2) = 'http://www.wiedersheim.com/index.html';
>
> if ($ENV{'HTTP_HOST'} =~ /clicktech.com/gi)
>     {
>         print "Location: $URL1\n\n";
>     }
>     else
>     {
>         print "Location: $URL2\n\n";
>     }
> exit;
> ---
>
> You would also need to make sure of the path to PERL (the first line
> above beginning with #!) on your host and that you are able to use
> index.cgi as a default document like index.htm, index.html,
> default.htm, etc...
> ____________________________________________________________
> B E N  V I G I L
> <ben@abelware.com>
>
>
>
>
>
> ----- Original Message -----
> From: Leo Wiedersheim <Leo.Wiedersheim@roxy.com>
> To: <thelist@lists.evolt.org>
> Sent: Wednesday, December 01, 1999 12:09 PM
> Subject: [thelist] 2 Domain Names, 1 Host?
>
>
> > Howdy,
> > I know it is possible to have two domain names resolve to the same
> host.
> > However, I am wondering if it is possible to detect which URL a
> person is
> > coming from and redirect them to a certain page on that host.  For
> example,
> > I currently have a virtual host with the domain name
> > http://www.wiedersheim.com and I've acquired the name ClickTech.com.
> If
> > someone wants to go to wiedersheim.com, I'd like them to go to
> > http://www.wiedersheim.com/index.html, if they want to go to
> > http://www.clicktech.com, I'd like them to be redirected to
> something like
> > http://www.wiedersheim.com/clicktech/index.html
> >
> > Is that possible?  If so, any hints as to how?
> >
> > Thanks a bunch.
> >
> > Leo.
> > ~
> > Leo P. Wiedersheim, Jr.
> > leo@wiedersheim.com
> > http://www.Wiedersheim.com
> > http://www.CampaignCollectibles.com
> >
>
>
>
> _______________________________________________________
> unsubscribe+options: http://lists.evolt.org/mailman/listinfo/thelist
> tip harvester: http://lists.evolt.org/harvest/
> email archive: http://lists.evolt.org/archive/
> http://evolt.org/  Workers of the Web, evolt !