剛連到 apple 網頁竟出現程式碼(已正常)

我還以為...又發生啥事了
不過看了一下...
嗯...
apple 果然是用自己的 OS X Server 軟體架的站

以下是....不小心出現的程式碼




#!/usr/local/bin/perl
# \/www\/htdocs\/ # The real docroot of the redirect server
$path = $ENV{'REQUEST_URI'};
$| = 1;
$0 = "asiared";
require "./init";
#if ($path =~ /\/$/){
#$path = join("",$path,"index.html");
#}
$host = $ENV{'HTTP_HOST'};
$destURI = @matrix{$host};

$location = join("",$destURI,$path);
$location = $destURI if(@frontdoor{$host} eq "front");
$location = "http://www.apple.com/" if ($destURI eq "");

$htm = "<HTML><HEAD><TITLE>Found</TITLE></HEAD><BODY>\n

Found

This document has moved to a new location.\nPlease update your documents and hotlists accordingly. ";
$end = "\n<!--httphost $ENV{'HTTP_HOST'}\nURI $ENV{'REQUEST_URI'}\n qs $QS\nenv $ENV{'QUERY_STRING'}-->\n</BODY></HTML>";
print <<"EOF"
HTTP/1.0 301 Found
Server: Apache/1.3.26 (Darwin)
Date: Tue Jun 1 12:48:03 PDT 1999 PDT
Location: $location
Content-type: text/html
EOF
;

$html = join("",$htm,$location,$end);
print 'Content-length: ' . length($html) . "\n\n";
print $html;
exit(0);

文章分享
評分
評分
複製連結

今日熱門文章 網友點擊推薦!