Redirect HTTPS requests to HTTP using IIS Rewrite rule in Web.Config

Use the provided rewrite rule to redirect HTTPS requests to HTTP.

commit 58ae2f2 · authored · 1 min read

Redirect HTTPS requests to HTTP using IIS Rewrite rule in Web.Config

The below-given rewrite rule which redirects all the HTTPS request to its HTTP URL. Redirecting HTTPS to HTTP isn’t recommended considering many factors. If you don’t have SSL purchased for your website, there are some cool options, like Cloudflare, it has a free package where it adds security to your site as well as provides free SSL, will write about it in a separate post.

<rewrite>
<rules>
<rule name="Redirect to HTTP" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^ON$" />
</conditions>
<action type="Redirect" url="http://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>

local graph · open full graph

"Redirect HTTPS requests to HTTP using IIS Rewrite rule in Web.Config" is connected to the topics Internet Information Services, Search Engine Optimization, Web.config, Rewrite Rules, ASP.NET and related to 6 other entries. Redirect HTTP to HTTPS using Web.Config in IIS Redirect HTTP to HTTPS usin… Redirect WWW to Non-WWW using Web.Config in IIS Redirect WWW to Non-WWW usi… Redirect non-www urls to www urls Redirect non-www urls to ww… C# - Get Web.Config Connection String in a Class Library C# - Get Web.Config Connect… IIS - Disable CORS IIS - Disable CORS IIS - OPTIONS Requests Returns 404 IIS - OPTIONS Requests Retu… Internet Information Services #iis Search Engine Optimization #seo Web.config #web-config Rewrite Rules #rewrite-rule ASP.NET #aspnet Redirect HTTPS requests to HTTP u…

comments

loading discussion…