#!/opt/bin/perl
read(STDIN, $browser_input, $ENV{'CONTENT_LENGTH'});
#If you are planning to use multiple accept types, consider splitting
#them up into an array, such as:
# %keyvalue=split(/,/,$ENV{'HTTP_ACCEPT'}). In this example, we don't
#really need to do that, we just find the string we are looking for.
if ($ENV{'HTTP_USER_AGENT'} =~ /^Mozilla/) {
print "Location:www.webdeveloper.com/julaug96/nsindex.html\n\n";
}
if ($ENV{'HTTP_ACCEPT'} =~ /jpeg/) {
print "Location:www.webdeveloper.com/julaug96/jindex.html\n\n";
}
else {
print "Location:www.webdeveloper.com/julaug96/dindex.html\n\n";
}
exit(0);