묻고답하기

http://www.xpressengine.com/index.php?document_srl=21841118&search_keyword=%EB%AA%A8%EB%B0%94%EC%9D%BC+%EC%A0%91%EC%86%8D&mid=qna

 

 

PC 웹사이트 초기 페이지(index) 상단 <head>와 </head> 사이에 아래와 같은 소스를 삽입 하시면 됩니다.

 

<script type="text/javascript">

function chkMobile(){ 

//모바일 페이지로 이동. 

if(document.referrer.substring(0,22)!="모바일 홈페이지 주소"){

var uAgent = navigator.userAgent.toLowerCase();

var mobileKeyWords = new Array('iPhone', 'iPod', 'BlackBerry', 'Android', 'Windows CE', 'LG', 'MOT', 'SAMSUNG', 'SonyEricsson', 'Nokia', 'Opera mini', 'Webos', 'Mot', 'Opera Mobi', 'ieMobile', 'LG');

for (var word in mobileKeyWords){

if (navigator.userAgent.match(mobileKeyWords[word]) != null){

parent.window.location.href='모바일 홈페이지 주소';

break;

}

}

}

}


var main={

init: function(){

//Mobile Device Check

chkMobile();

}

}


main.init();

</script>

 

 

위 질문게시판에 SEAN76 님의 답글을 보고 적용하려는데..

제 홈페이지는 초기 페이지(index) 가 없습니다.

아래 스샷에 보이는 index.php 파일에는< head>가 없어서 위 소스를 넣을곳을 못찾겠고..

sefsfef.gif

 

질문 간단하게 드립니다.

http://naver.com 홈페이지를

모바일에서 접속하면 자동으로

http://naver.com/help/6598 식으로 이동할 수 없을까요?

http://naver.com/help/6598  페이지만 모바일 전용입니다.