Howdy Zentara,

That one is closer than what my code was doing.  It's printing out the
tipsy.cgi (that reads "Netscape 4 page"), instead of surly.cgi
(reading "anti-Netscape 4 page"). 

But it directs IE 6, Mozilla 1, and Netscape 4.7 to the Netscape 4
page, instead of only the Netscape 4.7 page to it.

I'm still working with Connie & Wiggims suggestions though.  I figured
a browser redirect would be pretty easy to do....

--Dave


>Don't print the "Content-type: text/html\n\n" when using Location.
>
>#!/usr/local/bin/perl
>
>$url1 = 'http://myserver.com/cgi-bin/surly.cgi';
>$url2 = 'http://myserver.com/cgi-bin/tipsy.cgi';
>
>if ($ENV{'HTTP_USER_AGENT'} =~ /Mozilla 4/
>    and not $ENV{'HTTP_USER_AGENT'} =~ /compatible/i ) {
>    print "Location: $url1\n\n;
>} else {
>    print "Location: $url2\n\n";
>}
>





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to