µµ¸ÞÀÎ °ü·Ã           2009/02/24 10:24:46     5101     0   
   ¼­ºêµµ¸ÞÀÎ(2Â÷µµ¸ÞÀÎ) ¼ÂÆùæ¹ý

www.domain.comÀ¸·Î Á¢¼ÓÇÒ¶§´Â www.domain.com/main.htmlÀ¸·Î ¿¬°áµÇ°í,
admin.domain.comÀ¸·Î Á¢¼ÓÇÒ¶§´Â www.domain.com/admin/index.html·Î ¿¬°áµÇ°ÔÇÏ·Á¸é

index.html ¿¡ ´ÙÀ½°ú °°Àº ¼Ò½º¸¦ »ðÀÔÇÕ´Ï´Ù.

<? if($HTTP_HOST == "domain.com" || $HTTP_HOST == "www.domain.com") { ?>
<script LANGUAGE="JavaScript">location.replace('www.domain.com/main.html');</script>

<? } else if($HTTP_HOST == "admin.domain.com" ) { ?>
<script LANGUAGE="JavaScript">location.replace('admin.domain.com/admin/index.html');</script>
<? } ?>


¶Ç´Ù¸¥ ¹æ¹ýÀ¸·Î ÇÁ·¹ÀÓÀ» ÀÌ¿ëÇÏ¿© ¾Æ·¡¿Í °°ÀÌ »ç¿ëÇϽǼöµµ ÀÖ½À´Ï´Ù.
ÇÁ·¹ÀÓÀ» ÀÌ¿ëÇÑ ¼­ºêµµ¸ÞÀÎ ¹æ¹ýÀº µµ¸ÞÀÎÀÌ º¯°æµÇÁö ¾Ê°í °íÁ¤µÇ¾î¼­ º¸¿©Áý´Ï´Ù.
===============================================================
<?
  if($HTTP_HOST == "domain.com" || $HTTP_HOST == "www.domain.com") {
    $target = "/index.html"; // ¸ÞÀΠÆäÀÌÁö °æ·Î
  } else if($HTTP_HOST == "admin.domain.com") {
    $target = "/admin/index.htm"; // °ü¸®ÀÚ µµ¸ÞÀÎ ÆäÀÌÁö °æ·Î
  } else if($HTTP_HOST == "event.domain.com") {
    $target = "/event/index.htm"; // À̺¥Æ® µµ¸ÞÀÎ ÆäÀÌÁö °æ·Î
  }
?>
<html>
<title>Á¦¸ñ</title>
<frameset rows="1*">
  <frame src=<?=$target?> name="main" scrolling="auto" marginwidth="0" marginheight="0" noresize>
</frameset>
</html>
==================================================================
writer ip : 59.17.161.39 , modify 59.17.161.39 , 2009/02/24 10:49:54    

       

°ø°³°Ô½ÃÆÇ °ü·Ã Á¦·Îº¸µå4 º¸¾ÈÆÐÄ¡ ¸ðÀ½
µµ¸ÞÀÎ °ü·Ã ³×À̹ö ºí·Î±×¿¡ µµ¸ÞÀÎ ¿¬°áÇϱâ
µµ¸ÞÀÎ °ü·Ã µµ¸ÞÀÎ ¸íÀÇ º¯°æ ½Åû¼­
µµ¸ÞÀÎ °ü·Ã ¼­ºêµµ¸ÞÀÎ(2Â÷µµ¸ÞÀÎ) ¼ÂÆùæ¹ý
µµ¸ÞÀÎ °ü·Ã www ºÙÀº°Å³ª ¾ÊºÙÀº°Å³ª µ¿ÀÏÇÏ°Ô Á¢¼ÓÀ¯µµÇϱâ
µµ¸ÞÀÎ °ü·Ã ´ÙÁßµµ¸ÞÀÎ ¼ÂÆùæ¹ý
1