Howdy,
I'm trying to write a program that will redirect people looking at a
site using Netscape 4. (I have a header that looks good in Mozilla,
Netscape 6, and IE, but looks pretty crappy in Netscape 4).
I'm new at programming, and am still reading Elements of Programming
with Perl, so please go easy on me.
I've tried this, thinking the regex would look for Netscape 4, and
redirect but I'm missing something. It's not working.
I'm not sure if I should just code a separate page for Netscape 4, or
if I should try to put something in the cgi that if it is a Netscape 4
browser it should use a different set of header commands.
Thanks in advance,
--Dave
#! /usr/local/bin/perl
print "Content-type: text/html\n\n";
if ($ENV{'HTTP_USER_AGENT'} =~ /Mozilla 4/
and not $ENV{'HTTP_USER_AGENT'} =~ /compatible/i ) {
print <surly.cgi>;
} else {
print <tipsy.cgi>;
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]