답변 1개
답변에 대한 댓글 2개
c
chqhdpdy
10년 전
c
chqhdpdy
10년 전
아래처럼 적용하려고하니 https로 바뀌긴하는데 뒤에 포트번호를 붙혀야하는데
그건 어떻게 붙혀야할지 모르겠어서 질문드려요ㅠㅠㅠ
[code]
<script type="text/javascript">
// 현재 페이지는 https로 접속해야 한다.
if ( document.location.protocol == 'http:' ) {
document.location.href = document.location.href.replace('http:', 'https:');
}
[/code]
그건 어떻게 붙혀야할지 모르겠어서 질문드려요ㅠㅠㅠ
[code]
<script type="text/javascript">
// 현재 페이지는 https로 접속해야 한다.
if ( document.location.protocol == 'http:' ) {
document.location.href = document.location.href.replace('http:', 'https:');
}
[/code]
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
$main_url = "http://aaaa.co.kr"; 를
$main_url = "https://aaaa.co.kr:포트번호"; 로 변경하라는 건가요?
그럼 이렇게 되면 전체 페이지가 모두 이렇게 적용되는게 아닌지요ㅠㅠ?
특정페이지만 바꾸려고 하는거라서요..
그래서 한번 저렇게 바꿔봣는데요. 바꾸니 https주소로 들어가면 http주소로 바뀌어버리는데ㅠㅠ 스크립트 적용을 해야하는게 아닌가해서요...