Skip to content

Nordic-Dev/iis-url-rewrite-https

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

IIS HTTPS Rewrite Rule

Automatically rewrite requests from http --> https in .Net websites add this url rewrite rule to your in the web.config.

<configuration>
<system.webServer>
  <rewrite>
  	<rules>
  		<rule name="HTTPS" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
  			<match url="*" />
  			<conditions logicalGrouping="MatchAny">
  				<add input="{HTTPS}" pattern="off" />
  			</conditions>
  			<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
  		</rule>
  	</rules>
  </rewrite>	  
</system.webServer>
</configuration>

About

The http rewrite rule for redirecting http request to https

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published