[thelist] How can a redirect occur before onload?

Bill Anderson info at wjadesign.com
Thu Dec 21 22:22:56 CST 2000


try this as the Index.cgi in the root folder for UNIX servers, or access it
as a .pl in cgi-bin if NT:
Modify the domain name xxxxx to either a folder of a filename:


#!/usr/bin/perl


################################################################
#                                                              #
#                        EDIT BELOW                            #
#                                                              #
################################################################

$mainpage  = "index-main.html";


%domains = (
 'www.xxxxxxx.com'  => 'adg/',
);





################################################################
#               DO NOT CHANGE BELOW THIS LINE!                 #
################################################################

$server = lc($ENV{'HTTP_HOST'});if ($ENV{'HTTP_HOST'} =~
/(\d+)\.(\d+)\.(\d+)\.(\d+)/){$t='/'}else{if ($server !~ /^www./){$server =
'www.' . $server;}}@domains = keys(%domains);foreach $domain(@domains){if
($domain eq $server){print "Location:
http://${server}/$domains{$server}\n\n";$match="yes";last;exit}}unless
($match){print "Location: http://$server/$mainpage\n\n";exit}exit;



----- Original Message -----
From: "Bob Haroche" <bharoche at usa.net>
To: <thelist at lists.evolt.org>
Sent: Thursday, December 21, 2000 7:15 PM
Subject: Re: [thelist] How can a redirect occur before onload?


> Another option is to create a blank page with nothing on it but a JS
> redirect to the real IE or NN pages.  The blank page will load and
disappear
> very quickly.
>
> Of course, JS re-directs are frowned on by search engines, so be careful
> where you use them.
>
>
>
> ____________________________
> O n P o i n t  S o l u t i o n s
> P.O. Box 694
> Occidental, Ca  95465
> 707.874.1188
> http://www.OnPointSolutions.com
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list