{"id":1364,"date":"2015-10-01T08:07:17","date_gmt":"2015-09-30T23:07:17","guid":{"rendered":"http:\/\/aws2000.net\/?p=1364"},"modified":"2017-01-28T15:05:44","modified_gmt":"2017-01-28T06:05:44","slug":"http-%e3%81%8b%e3%82%89-https-%e3%81%b8%e3%83%aa%e3%83%80%e3%82%a4%e3%83%ac%e3%82%af%e3%83%88%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/aws2000.net\/?p=1364","title":{"rendered":"http \u304b\u3089 https \u3078\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1369\" src=\"\/\/aws2000.net\/wp-content\/uploads\/2015\/10\/15944989872_b958dc5552_z.jpg\" alt=\"SSL\" width=\"500\" height=\"250\" srcset=\"https:\/\/aws2000.net\/wp-content\/uploads\/2015\/10\/15944989872_b958dc5552_z.jpg 640w, https:\/\/aws2000.net\/wp-content\/uploads\/2015\/10\/15944989872_b958dc5552_z-300x150.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u756a\u53f7\u306e\u3084\u308a\u53d6\u308a\u3084\u9280\u884c\u53e3\u5ea7\u306e\u53d6\u308a\u6271\u3044\u306f\u3001\u5f53\u7136\u3067\u3059\u304c\u3001\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0\u30ab\u30fc\u30c8\u3084\u304a\u554f\u3044\u5408\u308f\u305b\u30d5\u30a9\u30fc\u30e0\u3084\u306a\u3069\u3067\u3082\u3001SSL(Secure Socket Layer) \u3092\u4f7f\u3046\u306e\u304c\u4e00\u822c\u7684\u306b\u306a\u3063\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u307e\u3067http \u3060\u3063\u305f\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u3092\u3001https \u306b\u5909\u66f4\u3059\u308b\u3068\u304d\u306b\u306f\u3001http \u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304d\u305f\u95b2\u89a7\u8005\u3092 https \u306b\u79fb\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3068\u3044\u3046\u306e\u3067\u3059\u304c\u3001\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u306e\u65b9\u6cd5\u306f\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u30012\u3064\u306e\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3>.htaccess \u3067\u30ea\u30c0\u30a4\u30ec\u30af\u30c8<\/h3>\n<p>SSL\u3092\u4f7f\u3044\u305f\u3044\u30d5\u30a9\u30eb\u30c0\u306b\u3001.htaccess \u3092\u7f6e\u304d\u3001\u305d\u3053\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-Markup\">&lt;IfModule mod_rewrite.c&gt;\r\nRewriteEngine on\r\nRewriteCond %{HTTPS} off\r\nRewriteRule ^(.*)$ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [R,L]\r\n&lt;\/IfModule&gt;\r\n<\/code><\/pre>\n<p>4\u884c\u76ee\u306e[R,L]\u306eR\u306f\u3001302\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/p>\n<p>301\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u306b\u3057\u305f\u3044\u5834\u5408\u306f\u3001R=301 \u3068\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<h3>php \u3067\u30ea\u30c0\u30a4\u30ec\u30af\u30c8<\/h3>\n<p>\u4f55\u304b\u306e\u7406\u7531\u3067.htaccess \u304c\u4f7f\u3048\u306a\u3044\u3001mod_rewrite \u304c\u4f7f\u3048\u306a\u3044\u5834\u5408\u306a\u3069\u3001\u3042\u3048\u3066php\u3067\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>https \u3067\u30a2\u30af\u30bb\u30b9\u3057\u305f\u5834\u5408\u3001$_SERVER \u914d\u5217\u5909\u6570\u306b\u3001HTTPS\u8981\u7d20\u304c\u898b\u3064\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>$_SERVER[&#8216;HTTPS&#8217;]\u306b\u3001&#8221;on&#8221; \u304c\u5165\u3063\u3066\u3044\u308c\u3070\u3001HTTPS \u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>php\u30b3\u30fc\u30c9\u306f\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<pre><code class=\"language-php\">if ($_SERVER['HTTPS'] == \"on\") {\r\n  \/\/ HTTPS\u306e\u6642\u306e\u51e6\u7406\r\n} else {\r\n  \/\/ HTTP\u306e\u6642\u306e\u51e6\u7406\r\n}\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u756a\u53f7\u306e\u3084\u308a\u53d6\u308a\u3084\u9280\u884c\u53e3\u5ea7\u306e\u53d6\u308a\u6271\u3044\u306f\u3001\u5f53\u7136\u3067\u3059\u304c\u3001\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0\u30ab\u30fc\u30c8\u3084\u304a\u554f\u3044\u5408\u308f\u305b\u30d5\u30a9\u30fc\u30e0\u3084\u306a\u3069\u3067\u3082\u3001SSL(Secure Socket Layer) \u3092\u4f7f\u3046\u306e\u304c\u4e00\u822c\u7684\u306b\u306a\u3063\u3066\u304d\u307e\u3057\u305f\u3002 \u4eca\u307e\u3067http  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1369,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":{"0":"post-1364","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-4"},"_links":{"self":[{"href":"https:\/\/aws2000.net\/index.php?rest_route=\/wp\/v2\/posts\/1364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aws2000.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aws2000.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aws2000.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aws2000.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1364"}],"version-history":[{"count":10,"href":"https:\/\/aws2000.net\/index.php?rest_route=\/wp\/v2\/posts\/1364\/revisions"}],"predecessor-version":[{"id":3149,"href":"https:\/\/aws2000.net\/index.php?rest_route=\/wp\/v2\/posts\/1364\/revisions\/3149"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aws2000.net\/index.php?rest_route=\/wp\/v2\/media\/1369"}],"wp:attachment":[{"href":"https:\/\/aws2000.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aws2000.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aws2000.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}