[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Redirect of subdomains



Hello,

Has anyone a solution to redirect subdomains to subdirectories with IP
based hosting on the Raq3?

For example, I have the host sub.domain.com pointing to the same IP as
www.maindomain.com, but I want Apache to redirect requests for
sub.domain.com to www.maindomain.com/sub

I have a script that I have used successfully before on Linux boxes (see
below), but I can't get it working on the Raq3. Any idea why?

--- script start ---

#!/usr/bin/perl

$url="";

if($ENV{'HTTP_HOST'} eq 'sub.domain.com')
{$url = "http://sub.domain.com/sub/index.htm"}

if($url eq "") {$url="http://www.maindomain.com"}

#################################################################
print "Location: $url\n";
print "Content-Type: text/html\n\n";
print "<HTML><HEAD><TITLE>$ENV{'HTTP_HOST'}</TITLE></HEAD><BODY>\n";
print "<A HREF=\"$url\">Click here to enter</A>\n";
print "</BODY></HTML>";

--- script end ---


Med vennlig hilsen / Yours Sincerely
Per Magne Knutsen
NetHut.no
http://www.nethut.no
mailto: support@xxxxxxxxxx
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Komplette WEB-løsninger:
Domene, epost og serverplass
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




----- Original Message -----
From: "Rickard Osser" <ricky@xxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>; <cobalt-developers@xxxxxxxxxxxxxxx>
Sent: Monday, October 30, 2000 5:46 PM
Subject: [cobalt-users] WebLogs package from Osser Brosoft AB


: Hi!
:
: I just wanted to tell you we've just finished a small (really
: small) package which makes it possible to turn on Analog logs for any
site
: on a RaQ3 and RaQ4.
:
: It's simple, it's completely Web-based and it interacts transparantly
with
: the Cobalt GUI. It is a ".pkg" file which installs through the cobalt
: Web-software installer.
:
: You can get more info about this software and order from our
: Web-site at: http://www.brosoft.net/en
:
: Price: US$ 50
:
: We've also made it possible for you to download our software by
: yourselves from the web, the WebLog Admin and our SSL-packages for the
: RaQ2 and Qube2.
:
: Best regards,
:
: Rickard Osser
: Manager
: -----------------------------------------------------------------------
: |Osser Lindist AB Distributor of Cobalt Networks servers|
: -----------------------------------------------------------------------
: |Osser Brosoft AB Computer Consultants                  |
: -----------------------------------------------------------------------
: |Maria Bangata 6 S-118 63 Stockholm, Sweden       |
: |Tel: +46-8-798 29 27 E-mail: ricky@xxxxxxxx       |
: |Fax: +46-8-668 89 10 http://www.lindist.com         |
: -----------------------------------------------------------------------
:
:
: _______________________________________________
: cobalt-users mailing list
: cobalt-users@xxxxxxxxxxxxxxx
: To Subscribe or Unsubscribe, please go to:
: http://list.cobalt.com/mailman/listinfo/cobalt-users