{"id":835,"date":"2015-05-22T08:20:18","date_gmt":"2015-05-22T08:20:18","guid":{"rendered":"http:\/\/ntspl.co.in\/blog\/?p=835"},"modified":"2021-12-20T11:06:34","modified_gmt":"2021-12-20T11:06:34","slug":"url-rewrite-http-to-https-except-files-in-a-specific-sub-folder-for-iis-7","status":"publish","type":"post","link":"https:\/\/www.ntspl.co.in\/blog\/url-rewrite-http-to-https-except-files-in-a-specific-sub-folder-for-iis-7\/","title":{"rendered":"URL Rewrite http to https except files in a specific sub folder for IIS 7"},"content":{"rendered":"<p>Redirecting all traffic from HTTP to HTTPS except one nonSSL folder \/ file in IIS7 will make sure your users always access the site securely. There are many different ways to set up an IIS7 Redirect from HTTP to HTTPS and some are better than others. The ideal HTTP to HTTPS redirect would do the following:<\/p>\n<ul class=\"marB10\">\n<li>Gently redirect users to HTTPS so users don\u2019t have to type in \u201chttps\u201d in the URL<\/li>\n<li>Redirect users to the specific page that they were going to go to on HTTP (page.htm)<\/li>\n<li>Save any variables passed in the query string (?page=2)<\/li>\n<li>Work in all browsers<\/li>\n<li>Transfer PageRank to the redirected page by using a 301 redirect, maintaining SEO<\/li>\n<li>Allow specific parts of a site to force SSL but allow HTTP on other parts of the site<\/li>\n<li>Redirect users from mydomain.com to www.mydomain.com<\/li>\n<\/ul>\n<pre class=\"code-structure\"><code>\r\n&lt;rule name=\"NoSSL - folder\" enabled=\"true\" stopProcessing=\"true\"&gt;\r\n\t&lt;match url=\"^nossl\/.*\" \/&gt;\r\n\t&lt;conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\"&gt;\r\n\t&lt;\/conditions&gt;\r\n\t&lt;action type=\"None\" \/&gt;\r\n&lt;\/rule&gt;\r\n&lt;rule name=\"HTTP to HTTPS redirect\" stopProcessing=\"true\"&gt;\r\n\t&lt;match url=\"(.*)\" \/&gt;\r\n\t&lt;conditions&gt;\r\n\t\t&lt;add input=\"{HTTPS}\" pattern=\"off\" ignoreCase=\"true\" \/&gt;\r\n\t&lt;\/conditions&gt;\r\n\t&lt;action type=\"Redirect\" redirectType=\"Permanent\" url=\"https:\/\/{HTTP_HOST}\/{R:1}\" \/&gt;\r\n&lt;\/rule&gt;\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Redirecting all traffic from HTTP to HTTPS except one nonSSL folder \/ file in IIS7 will make sure your users always access the site securely. There are many different ways to set up an IIS7 Redirect from HTTP to HTTPS and some are better than others. The ideal HTTP to HTTPS redirect would do the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1467,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[36,18,22,25,31,33,35],"tags":[42,48,171,172,355,376],"class_list":["post-835","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-htaccess","category-iis-7-5","category-ntspl","category-php","category-ssl","category-web-hosting","category-web-config","tag-htaccess","tag-301-permanent-redirect","tag-http-to-https-redirection","tag-https-except-one-nonssl-folder","tag-url-redirection","tag-web-config"],"acf":{"custom_meta_title":"Rewrite HTTP to HTTPS Except Files in a Specific Sub Folder","meta_description":"Get to know how to redirect all traffic from HTTP to HTTPS except files in a specific subfolder for IIS 7 to make sure your users always access the site securely.","meta_keyword":"http to https redirection, domain redirection, url rewriting","other_meta_tag":"<meta property=og:locale content=\"en-IN\" \/>\r\n<meta property=og:type content=\"website\" \/>\r\n<meta property=og:title content=\"Rewrite HTTP to HTTPS Except Files in a Specific Sub Folder\"\/>\r\n<meta property=og:description content=\"Get to know how to redirect all traffic from HTTP to HTTPS except files in a specific subfolder for IIS 7 to make sure your users always access the site securely.\"\/>\r\n<meta property=og:url content=\"https:\/\/www.ntspl.co.in\/blog\/url-rewrite-http-to-https-except-files-in-a-specific-sub-folder-for-iis-7\"\/>\r\n<meta property=og:site_name content=NTSPL \/>\r\n<meta name=\"twitter:site\" content=\"@NTSPL\">\r\n<meta name=twitter:card content=\"summary\" \/>\r\n<meta name=twitter:description content=\"Get to know how to redirect all traffic from HTTP to HTTPS except files in a specific subfolder for IIS 7 to make sure your users always access the site securely.\"\/>\r\n<meta name=twitter:title content=\"Rewrite HTTP to HTTPS Except Files in a Specific Sub Folder\"\/>"},"_links":{"self":[{"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/posts\/835"}],"collection":[{"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/comments?post=835"}],"version-history":[{"count":12,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/posts\/835\/revisions"}],"predecessor-version":[{"id":4376,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/posts\/835\/revisions\/4376"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/media\/1467"}],"wp:attachment":[{"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/media?parent=835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/categories?post=835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ntspl.co.in\/blog\/wp-json\/wp\/v2\/tags?post=835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}