{"id":975,"date":"2010-10-08T20:55:58","date_gmt":"2010-10-08T20:55:58","guid":{"rendered":"http:\/\/www.phpmind.com\/blog\/?p=975"},"modified":"2010-10-08T20:55:58","modified_gmt":"2010-10-08T20:55:58","slug":"how-to-force-http-to-https-through-htaccess","status":"publish","type":"post","link":"https:\/\/www.phpmind.com\/blog\/2010\/10\/how-to-force-http-to-https-through-htaccess\/","title":{"rendered":"How to force http to https through .htaccess?"},"content":{"rendered":"<p>In order to force https:\/\/ in payment and other secure pages even if your customer try to access http:\/\/  or they forget. You can use .htaccess file and simple code. <\/p>\n<p>Example \u2013<br \/>\nI had created a page  http:\/\/www.phpmind.com\/blog\/<br \/>\nI want my visitor to access https:\/\/www.phpmind.com\/blog\/<br \/>\nHere is code which will force them to redirect to https:\/\/<\/p>\n<pre lang=\"php\">\r\nRewriteEngine On\r\nRewriteCond %{HTTPS} off\r\nRewriteRule (.*) https:\/\/%{HTTP_HOST}%{REQUEST_URI}\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In order to force https:\/\/ in payment and other secure pages even if your customer try to access http:\/\/ or they forget. You can use .htaccess file and simple code. Example \u2013 I had created a page http:\/\/www.phpmind.com\/blog\/ I want my visitor to access https:\/\/www.phpmind.com\/blog\/ Here is code which will force them to redirect to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[33,3],"tags":[],"class_list":["post-975","post","type-post","status-publish","format-standard","hentry","category-htaccess","category-php"],"_links":{"self":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/comments?post=975"}],"version-history":[{"count":1,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/975\/revisions"}],"predecessor-version":[{"id":976,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/975\/revisions\/976"}],"wp:attachment":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/media?parent=975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/categories?post=975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/tags?post=975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}