테스트 사이트 - 개발 중인 베타 버전입니다

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

· 1년 전 · 1685 · 7

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>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 7개

리디렉션을 스크립트로 처리 도가능하군요 좋은팁감사합니다. 나중에 한번써먹어야 겟습니다. 감사합니다.

@웅프 도움이 되셨기를^^

1년 전

리디렉션을 스크립트로 처리 도가능하군요 좋은팁감사합니다. 나중에 한번써먹어야 겟습니다. 감사합니다.

@라온헤윰 도움이 되셨기를 바랍니다^^

302 설정하면 간편할텐데 .. 

1년 전

감사합니다. 

@희희아빠 도움이 되셨기를^^

게시글 목록

번호 제목
24149
24140
24133
24125
24119
24109
24105
24101
24093
24089
24077
24074
24071
24070
24067
24056
24050
24046
24043
24040
24037
24036
24035
24034
24021
24017
24005
24002
23990
23980