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 설정하면 간편할텐데 .. 

감사합니다. 

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

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

그누보드5 팁자료실

+
제목 글쓴이 날짜 조회
1년 전 조회 1,441
1년 전 조회 1,133
1년 전 조회 2,502
1년 전 조회 1,339
1년 전 조회 1,345
1년 전 조회 2,345
1년 전 조회 1,399
1년 전 조회 1,535
1년 전 조회 2,095
1년 전 조회 1,818
1년 전 조회 2,195
1년 전 조회 1,520
1년 전 조회 1,275
1년 전 조회 5,926
2년 전 조회 1,995
2년 전 조회 1,597
2년 전 조회 1,392
2년 전 조회 1,392
2년 전 조회 2,038
2년 전 조회 1,555
2년 전 조회 1,553
2년 전 조회 3,500
2년 전 조회 2,585
2년 전 조회 1,949
2년 전 조회 2,029
2년 전 조회 1,678
2년 전 조회 2,314
2년 전 조회 1,291
2년 전 조회 1,652
2년 전 조회 1,144