{"id":1977,"date":"2020-05-13T16:22:28","date_gmt":"2020-05-13T14:22:28","guid":{"rendered":"https:\/\/digitalia.culturanuova.net\/blog\/?p=1977"},"modified":"2020-05-13T16:26:36","modified_gmt":"2020-05-13T14:26:36","slug":"how-avoid-https-problems-in-localhost","status":"publish","type":"post","link":"https:\/\/digitalia.culturanuova.net\/blog\/?p=1977","title":{"rendered":"How avoid https problems  in localhost"},"content":{"rendered":"\n<p>Since a solution to force browsers toward a secured connection (with <em>https<\/em> and not <em>http<\/em>) is using an .htaccess file in the root folder, you can avoid many problems with https in localhost with this code, which you can put into the .htaccess, before the last row:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteCond %{HTTP_HOST} ^&#91;^.]+\\.&#91;^.]{3}$<\/code><\/pre>\n\n\n\n<p>So your .htacces file should contain these rows<\/p>\n\n\n\n<p><code>RewriteEngine On<br>\nRewriteCond %{HTTPS} !on<br>\n<b>RewriteCond %{HTTP_HOST} ^[^.]+.[^.]{3}$<\/b><br>\nRewriteRule (.*) https:\/\/%{HTTP_HOST}%{REQUEST_URI}<\/code><\/p>\n\n\n\n<p>This way you will have, with the same file, in local an http connection, and in remore an https connection.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since a solution to force browsers toward a secured connection (with https and not http) is using an .htaccess file in the root folder, you can avoid many problems with https in localhost with this code, which you can put into the .htaccess, before the last row: So your .htacces file should contain these rows &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/digitalia.culturanuova.net\/blog\/?p=1977\" class=\"more-link\">Leggi tutto<span class=\"screen-reader-text\"> &#8220;How avoid https problems  in localhost&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[566],"tags":[293,294],"class_list":["post-1977","post","type-post","status-publish","format-standard","hentry","category-webmaster","tag-https","tag-localhost"],"_links":{"self":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1977"}],"version-history":[{"count":2,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1977\/revisions"}],"predecessor-version":[{"id":1979,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1977\/revisions\/1979"}],"wp:attachment":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}