Hello ,
We have old ASp.net MVC application that needs to be converted to https.
I do not have a lot of experience with ASP.net so struggling with this issue
The application has a default Webpage and multiple tabs , where each tab is new aspx page.
I have downloaded the cert and installed on the webserver and associated the cert to site with 443 binding.
Also downloaded Url Rewrite module and added the rewrite rules to route any http to https.
All this works well when both port 80 and port 443 are enabled in the bindings
However, when I remove port 80 binding and keep just port 443 , when I browse the application , the startup page loads fine with https , however when I click tab to go to another page and it goes to http by default and gives 404 error (not found).
If I change url manually to https for any aspx page it works.
How do I make sure all the pages on website are only using https (443), as we need to remove port 80.
Am I missing any conifguration ?
Below is the redirect rule from web.config
<rewrite>
<rules>
<rule name="HTTP to HTTPS Redirection" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
</rule>
</rules>
</rewrite>
Thank you and appreciate any help !!