Help for this page

Select Code to Download


  1. or download this
    DirectoryIndex /cgi-bin/redir.pl
    
  2. or download this
    #! /usr/bin/perl
    print"Location: index.".(($ENV{HTTP_ACCEPT}=~/html/g)[0]||'wml')."\n\n
    +";
    
  3. or download this
    #! /usr/bin/perl
     
    ...
    open FILE,"$ENV{DOCUMENT_ROOT}$ENV{REQUEST_URI}index.${\($1||'html')}"
    + or die($!);
    print "Content-type: text/${\($&||'html')}\n\n";
    print while (<FILE>);