G

도메인에 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>

|

댓글 7개

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

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

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

(2)

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

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

감사합니다. 

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

댓글을 작성하시려면 로그인이 필요합니다.
+
제목 글쓴이 날짜 조회
24-03-31 조회 6,040
24-03-31 조회 5,005
24-03-29 조회 5,230
24-03-27 조회 6,136
24-03-27 조회 5,961
24-03-27 조회 6,451
24-03-22 조회 5,500
24-03-19 조회 4,917
24-03-19 조회 1.1만
24-03-15 조회 5,697
24-03-15 조회 5,222
24-03-15 조회 5,087
24-03-15 조회 5,088
24-03-13 조회 5,704
24-03-05 조회 5,178
24-03-01 조회 5,193
24-02-29 조회 7,264
24-02-29 조회 6,366
24-02-28 조회 5,661
24-02-27 조회 5,770
24-02-24 조회 5,332
24-02-18 조회 5,979
24-02-17 조회 4,954
24-02-15 조회 5,298
24-02-14 조회 4,819
24-02-13 조회 8,320
24-02-05 조회 5,497
24-01-31 조회 5,685
24-01-30 조회 4,998
24-01-30 조회 5,628