160;1200;lj16; 카6168;24 호스ᔚ1;에 1228;/196; 보드를 씁니다.
예를 들Ǻ12; 1228; 홈6168;1060;1648; 도메1064;1060; https://myhome.com 1060;라고 한다면...
1228;/196;보드를 Ǹ16;면 http://myhome.com/xe /196; .104;면서 뒤에 xe가 붙1424;.160;
http1452;소를 https 1452;소/196; 리다1060;/113;트 Ȣ16;lj16; 가1109; 1068;0152;1201;1064; 0169;법1008; .htaccess 파1068;1012; 수1221;Ȣ16;lj16; ,148;데요.
1064;터넷1012; ,160;색해 보니
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
1060;런 구문1012; .htaccess 파1068; 최상단에 붙여넣1004;면 http1452;소가 1088;ᇼ1;1004;/196; https/196; 리다1060;/113;트 .104;더라구요.
문1228;lj16; .htaccess 파1068;까1648; 1217;근Ȣ16;,172; Ȣ16;/140;면 사용1088;가 1452;소를 http://myhome.com/xe 처/100; 뒤에 xe까1648; 붙여1480;야 한다lj16; ,161;니다.
근데 보통 사람들1008; xe 1452;소까1648; 안붙1060;1094;아요?
그래서 Ǻ12;떻,172; Ȣ16;면 1068;0152;1452;소를 치고 리다1060;/113;트 Ȣ16;,172; 할까 고0124;1473;1064;데요.
160;http://myhome.com 1012; 1452;소창에 Ǹ16;면 가1109; 먼1200; 1217;근.104;lj16; 파1068;1060; index.html 파1068;1064;,144; 같1008;데요.
내용1012; 살6196;보면
<html>
<head>
<title>새해 복많1060; 0155;1004;세요. 2cpu 회원님Nj16;</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<frameset rows="*,0" border=0>160;
<frame src="http://myhome.com/xe" frameborder=0 scrolling=auto>
</frameset>160;
<noframes>
<body>
</body>
</noframes>
</html>
index.html 파1068;에서 160;http://myhome.com/xe 1452;소를 불러와서 사용1088;에,172; 보,172;-140; Ȣ16;lj16; 구1312;1064;,144; 같1008;데요.
1060;/111;,172; .104;면 http://myhome.com/196; 1217;속해도 Ȣ16;위 1452;소/196; 1217;속1060; .104;고 사용1088;1032; 창에lj16; xe를 안봐도 .104;1424;.
그/111;다면 index.html 파1068;1012; 수1221;Ȣ16;면 https 1452;소/196; 변ᅆ1;할수 1080;,192;다lj16; 생각1060; 들었lj16;데요.
1068;0152;1201;1004;/196; 많1060; Ǹ16;lj16; 납치 태그/196; Ȣ16;면...
<meta http-equiv="refresh" content="0;URL=https://myhome.com/xe'" />
1060;ᅆ1;우lj16; ᇼ1;1089;1008; 1096;Ȣ16;lj16;데 1452;소창에 https://myhome.com/xe 처/100; xe가 남아서 보기 7113;합니다.
<meta http-equiv="refresh" content="0;URL=https://myhome.com'" />
1060;/111;,172;만 Ǹ16;면 처1020; 6168;1060;1648;를 0152;복 호출Ȣ16;므/196; 무한 루프에 빠1648;고요.
그래서 머리를 굴리다 보니 html에 php 함수나 명/161;Ǻ12;를 불러서 ,144;기서 https 1452;소/196; 변ᅆ1;Ȣ16;면 .104;1648; 않1012;까 생각했lj16;데요.
1064;터넷1012; ,160;색해도 1096; 나오1648; 않고 글1088; 출/141;Ȣ16;lj16; 예1228;1221;도0150;에 안나오네요.
1228;가 문외한1060;라서 그런데 0169;법1012; 아시면 알/140; 1452;시면 안.112;까요?
.htaccess 파1068;에 1080;lj16; 아래 명/161;Ǻ12;들1012;...
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
index.html에 넣Ǻ12; ᇼ1;1089;시킬수lj16; 없1012;까요?
¸»¾¸ ÇϽŰÍó·³ ÁÖ¼Ò¸¸ ÃÆÀ»¶§ Á¦ÀÏ Ã³À½ Á¢±ÙÇÏ´Â ÆÄÀÏÀÌ
Index.html À̶ó°í Çϼ̴µ¥ ÀÌ°ÍÀº
¼¹ö ¼³Á¤¿¡¼ index.html ¸»°í ´Ù¸¥ °Å·Î ¹Ù²Ü¼ö ÀÖ½À´Ï´Ù
¿¹¸¦µé¸é Index.php ÀÌ·±½ÄÀ¸·Î¿ä
¼¹ö¼³Á¤À» ¹Ù²Ù½Ã°í php¿¡°Å ÇØ°áÇÏ½Ã¸é µÉ°Å °°³×¿ä
html¿¡¼ ÀÚ¹Ù ½ºÅ©¸³Æ®·Î ÇÑÁÙ ³ÖÀ¸´Ï ¹Ù·Î ÇØ°áµÇ¾ú³×¿ä.
<script>
if(window.location.protocol == "http:"){
window.location.protocol = "https:";
}
</script>
ÀÌ·¸°Ô index.html ¸Ç ¾ÕÁÙ¿¡ ³ÖÀ¸´Ï ¹Ù·Î ÇØ°áµÇ¾ú¾î¿ä.
.htaccess ÆÄÀÏ °Çµå¸± ÇÊ¿äµµ ¾ø³×¿ä. ¤¾¤¾
httpÀÇ À妽º´Â htm, httpsÀÇ À妽º´Â php ÀÌ·±½ÄÀ¸·Î ÇÑ´ÙÀ½ htmÆÄÀÏÀÇ ³»¿ë¹°À» xeÂÊÀ¸·Î redirect¶óµµ ½ÃÅ°¸é µË´Ï´Ù