[php] 도메인주소 www > 팁앤테크

본문 바로가기

사이트 내 전체검색

뒤로가기 팁앤테크

[php] 도메인주소 www

본문

www붙이기

<script  language="JavaScript" 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>


www없애기

<script language="javascript">
 var strHostname="";
 strHostname = document.location.hostname;
 strHostname = strHostname.toLowerCase();

 if (strHostname == "www.zeronara.net"){
  location.href = "http://zeronara.net/";
 }

</script>
추천0

댓글목록 2

ChanbiZ님의 댓글

ChanbiZ쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

별 거 아닌거 같아요 꽤 필요할 때가 있기 마련이죠..
특히 모모모 계정 등에선.. 무조건 써야함.. 안그러면 피봄.. ㅎㅎ
^_^

곰순이푸님의 댓글

곰순이푸쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

모모모 계정이 머에용?

  • 게시물이 없습니다.
전체 825건 38 페이지
게시물 검색
Copyright (c) 株式会社YHPLUS. All rights reserved.

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒171-0014 東京都豊島区池袋2-41-5 アーバン154 8F
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

PC 버전으로 보기