#!/usr/bin/perl ####################################################### # IEcheck.pl script by Vic Freed vic@umcc.umich.edu # # Copyright (c) 1997 Vic Freed All Rights Reserved. # # Free to use for non evil purposes. # # # # This script detects MSIE in "HTTP_USER_AGENT" and # # sends $goodpage if it is not "MSIE". It sends # # $MSIEpage if it detects "MSIE" # # # # Edit "$goodpage" and "$MSIEpage" so they point to # # your html files. Include full pathing and make # # sure the files are permed world readable. # ####################################################### $goodpage = "/include/full/pathing/and/file/name"; $MSIEpage = "/include/full/pathing/and/file/name"; ####################################################### $count = "0"; $string = $ENV{ HTTP_USER_AGENT }; while ($string =~ /MSIE/g) { $count++ }; print "Content-type: text/html\n\n"; if ($count > 0) { open (FILEHANDLE,"<$goodpage"); } else { open (FILEHANDLE,"<$MSIEpage"); } while() { print $_; } close (FILEHANDLE); # ---------- EXIT exit; exit;