I have created a redirect rule in my web.config in order to redirect my website from http to https. I published my website on my staging and it was working perfectly. After some manipulation in my web.config, i published again my website and now i have a HTTP 500 error. I tried to undo those modification and set my web.config as it was and i still have that error. I tried everything as well as deleting my web.config and create a new one but it seems that the manipulation i did has crushed my staging and i am not able to make it work again.
This is my web.config before redirection:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false">
</aspNetCore>
</system.webServer>
</configuration>
This is what i added for redirecting my http to https and it was working perfectly.
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
Then i made some manipulation and change the action input {HTTP_POST} to my domain name. While it is working locally, my staging is not working anymore and i tried to undo everything but i still have the HTTP 500. What should i do?