JavaScript 도메인에 www 를 무조건 넣거나 빼기
페이지 정보
본문
[ 방법 1 ] https://www.happyjung.com/aaa=bbb --> https://www.happyjung.com/aaa=bbb
<script type="text/javascript">
<!--
var host = location.host.toLowerCase();
var currentAddress = location.href;
if (host.indexOf("www")== -1) {
currentAddress = currentAddress.replace("//","//www.");
location.href = currentAddress;
}
//-->
</script>
[ 방법 2 ] https://www.happyjung.com/aaa=bbb --> https://www.happyjung.com
<script type="text/javascript">
<!--
if(document.domain == "happyjung.com")
location.href = "https://www.happyjung.com"
//-->
</script>
참고자료
http://www.webhost.co.kr/19602
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=29582
<script type="text/javascript">
<!--
var host = location.host.toLowerCase();
var currentAddress = location.href;
if (host.indexOf("www")== -1) {
currentAddress = currentAddress.replace("//","//www.");
location.href = currentAddress;
}
//-->
</script>
[ 방법 2 ] https://www.happyjung.com/aaa=bbb --> https://www.happyjung.com
<script type="text/javascript">
<!--
if(document.domain == "happyjung.com")
location.href = "https://www.happyjung.com"
//-->
</script>
참고자료
http://www.webhost.co.kr/19602
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=29582
댓글목록
등록된 댓글이 없습니다.