Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: OFF_TOPIC - apache

RE: OFF_TOPIC - apache

From: Mark Leith <mark_at_cool-tools.co.uk>
Date: Thu, 04 Jul 2002 06:28:37 -0800
Message-ID: <F001.0048FCC6.20020704062837@fatcity.com>


Andrey,

This is usually done with re-direction scripts written in something like perl.. Here is one that I'm using for our new web site when it comes online:

The following should be used as the "index" page in the "root web directory" of your Apache server (usually htdocs), modify the title of your page and call it "index.html":



<HTML>
<HEAD>
<TITLE>***PAGE TITLE***</TITLE>
</HEAD>

<frameset cols="100%" rows="100%,*" FRAMEBORDER="0" BORDER="0" FRAMESPACING="0">
<frame src="cgi-bin/localjump.pl" name="MAIN" scrolling="AUTO" noresize> </frameset>

</HTML>



Copy the following in to a file and call it localjump.pl, then save it to your cgi-bin directory under Apache, and chmod the permissions to 755.



#!/usr/bin/perl
####################################################################
#
# localjump.pl
#
# Redirects the visitor to a folder of your choice depending on
# which domain or subdomain they entered through
#
####################################################################

$ref = $ENV{'HTTP_REFERER'};
$url = "http://www.yourdomain.com";

# Set a default folder

$default="http://www.yourdomain.com/default/";

# Set folders for each possible domain or subdomain

if ($ref =~ /domain1/)	{
	$url="http://www.yourdomain.com/domain1";	}

if ($ref =~ /domain2/)	{
	$url="http://www.yourdomain.com/domain2";	}

if ($ref =~ /domain3/)	{
	$url="http://www.yourdomain.com/domain3";	}

# Changing anything below this line is not recommened

if($url eq "") { $url = $default; }

print "Content-type: text/html\n\n";
print "<html>\n";
print "<head>\n";
print "<script language=\"JavaScript\">\n";
print "{\n";
print "location.href=\"$url\";\n";
print "}\n";
print "</script>\n";
print "</head>\n";
print "<body>\n";
print "</body>\n";
print "</html>";

exit;

Hey presto!

HTH Mark


 Mark Leith             | T: +44 (0)1905 330 281
 Sales & Marketing      | F: +44 (0)870 127 5283
 Cool Tools UK Ltd      | E: mark_at_cool-tools.co.uk
===================================================
           http://www.cool-tools.co.uk
       Maximising throughput & performance

-----Original Message-----
Sent: 04 July 2002 14:28
To: Multiple recipients of list ORACLE-L

Dear gurus !
Sorry for this off topc posting. I know that there are many of us who manage apache as well.
I have a question about apache configuration: Is there a possibility to configure apache, so that a user who types only the domain name in the browser (ie. www.abcd.com) will be automatically redirected to a specific URL (such as www.abcd.com/xxx/yyy/qqq.html) . Thanks a lot !

DBAndrey

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Andrey Bronfin
  INET: andreyb_at_elrontelesoft.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mark Leith
  INET: mark_at_cool-tools.co.uk

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Jul 04 2002 - 09:28:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US