[thelist] cgi redirection based on referrer
Gustavo Arizpe
garizpe at network.com.mx
Tue Jun 12 21:49:36 CDT 2001
I have a parked domain in my main hosting account, and a cgi program for
redirecting depending on the accesed domain, as follows:
______
#!/usr/bin/perl
$server = $ENV{'HTTP_HOST'};
if ($server eq "usabilidad.org" || $server eq "www.parkeddomain.com") {
print "Location: http://parkeddomain.com/somedirectory/\n\n;
exit;
}
else {
print "Location: http://$server/index.shtml\n\n";
exit;
}
print "Content-type: text/htmlnn";
________
How can I make this cgi to redirect depending on the URL referrer, for
example, I'd all my visitors from google to be taken to some directory?
Thank you so much.
Gustavo
More information about the thelist
mailing list