도메인에 www를 강제삽입하기 > 그누보드5 팁자료실

그누보드5 팁자료실

도메인에 www를 강제삽입하기 정보

도메인에 www를 강제삽입하기

본문

head안에 추가해 주시면 도메인에 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>

 

http 일반 홈페이지 강제 https로 접속하기

  <script language="Javascript" type="text/javascript">
  <!--
  var host = location.host.toLowerCase();
  var currentAddress = location.href;
  if (host.indexOf("www")== -1)
  {
  currentAddress = currentAddress.replace("//http","//https.");
  location.href = currentAddress;
  }
  //-->
  </script>

추천
2
  • 복사

댓글 7개

© SIRSOFT
현재 페이지 제일 처음으로