¾Æ·¡¿Í °°ÀÌ frame ¹®¼ htmlÀ» ³ÖÀº index.cgi ÆÄÀÏÀ» °¡¸®ÄÑ Áּż °¨»çÈ÷ »ç¿ëÇÏ°í ÀÖ½À´Ï´Ù.
±×·±µ¥ index.cgi¸¦ ÅëÇÏ¿© ÇÁ·¹ÀÓ ¹®¼°¡ ¿·ÈÀ» ¶§ »õ·Î °íħÀ» Çϸé frame src°ªÀÇ ÆäÀÌÁö·Î À̵¿À» ÇÕ´Ï´Ù. ÀÌ°ÍÀ» src °ªÀÇ ÆäÀÌÁö°¡ ¾Æ´Ñ ÇöÀç º¸°í ÀÖ´Â ÆäÀÌÁö¸¦ À¯ÁöÇÏ´Â ¹æ¹ýÀ» ¾Ë°í ½Í½À´Ï´Ù.
ÀÎÅͳÝÀ» ã¾Æº¸´Ï±î ÇÁ·¹ÀÓÀ» ¼³Á¤ÇÏ´Â ÆÄÀÏ ¸Ç À§ÂÊ¿¡ ´ÙÀ½ php ¼Ò½º¸¦ ³ÖÀ¸¶ó°í µÇ¾î ÀÖ´øµ¥ cgi ÆÄÀÏ¿¡¼ ¾²´Â ¹æ¹ýÀ» °¡¸®ÄÑ ÁÖ½Ã¸é °¨»çÇÏ°Ú½À´Ï´Ù.
<?
$LastModified = gmdate("D d M Y H:i:s", filemtime($HTTP_SERVER_VARS[SCRIPT_FILENAME]));
header("Last-Modified: $LastModified GMT");
header("ETag: "$LastModified"");
?>
################ ¾Æ ·¡ ####################
$web001="aaaa.com";
$web002="bbbb.com";
if ($ENV{'SERVER_NAME'}=~/$web001/) {
print "Content-type:text/html\n\n";
&aaaa_PRINT;
exit;
}
elsif ($ENV{'SERVER_NAME'}=~/$web002/) {
print "Content-type:text/html\n\n";
# Bsite HTML PRINT
&bbbb_PRINT;
exit;
}
else {
print "Content-type:text/html\n\n";
&cccc_PRINT;
exit;
}
sub aaaa_PRINT{
print <<END_LINE;
<HTML>
<HEAD>
</HEAD>
<FRAMESET ROWS="1*">
<FRAME NAME="main" SRC="./aaaa.cgi">
<NOFRAMES>
<BODY>
</BODY>
</NOFRAMES>
</FRAMESET>
</HTML>
END_LINE
exit;
}
sub bbbb_PRINT{
print <<END_LINE;
<HTML>
<HEAD>
<TITLE>bbbb</TITLE>
</HEAD>
<FRAMESET ROWS="1*">
<FRAME NAME="main" SRC="./bbbb.cgi">
</FRAMESET>
</HTML>
END_LINE
exit;
}
sub cccc_PRINT{
print <<END_LINE;
<HTML>
<HEAD>
<TITLE>cccc</TITLE>
</HEAD>
<FRAMESET ROWS="1*">
<FRAME NAME="main" SRC="./cccc.cgi">
</FRAMESET>
</HTML>
END_LINE
exit;
}