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 조회 5,894
24-03-31 조회 4,839
24-03-29 조회 5,077
24-03-27 조회 5,914
24-03-27 조회 5,766
24-03-27 조회 6,254
24-03-22 조회 5,312
24-03-19 조회 4,741
24-03-19 조회 1.1만
24-03-15 조회 5,521
24-03-15 조회 5,057
24-03-15 조회 4,939
24-03-15 조회 4,919
24-03-13 조회 5,560
24-03-05 조회 4,996
24-03-01 조회 5,036
24-02-29 조회 7,105
24-02-29 조회 6,208
24-02-28 조회 5,493
24-02-27 조회 5,622
24-02-24 조회 5,190
24-02-18 조회 5,808
24-02-17 조회 4,781
24-02-15 조회 5,139
24-02-14 조회 4,651
24-02-13 조회 8,129
24-02-05 조회 5,332
24-01-31 조회 5,508
24-01-30 조회 4,832
24-01-30 조회 5,441