답변 1개
<?
if ($_SERVER[HTTP_HOST]== "a.com") {
print "
<script>
location.href='http://http://www.a.com/A/index.php" target="_blank">www.a.com/A/index.php';
</script>";
}else if ($_SERVER[HTTP_HOST]== "http://www.a.com">www.a.com") {
print "
<script>
location.href='http://http://www.a.com/A/index.php" target="_blank">www.a.com/A/index.php';
</script>";
}else if ($_SERVER[HTTP_HOST]== "b.net") {
print "
<script>
location.href='http://http://www.b.net/b/index.php" target="_blank">www.b.net/b/index.php';
</script>";
}else if ($_SERVER[HTTP_HOST]== "http://www.b.net">www.b.net") {
print "
<script>
location.href='http://http://www.b.net/b/index.php" target="_blank">www.b.net/b/index.php';
</script>";
}
?>
음 같은 폴더 내에서 사용을 할 경우...
주로 웹 호스팅의 경우 임대 받으 하나의 계정에서 사용을 하다 보니...
도메인을 여럿 사용을 해도, 하나의 사이트로만 연결이 되곤 합니다.
그럴 경우 이런 방식으로 사용을 하고는 했습니다.
그 외 서버를 운영하는 경우
리눅스 아파치를 사용시
버츄어 호스트 쪽을 수정하여
접속 한 도메인 주소에 따른 경로를 조정할 수 있습니다.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인