Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Migration #4004


User avatar
0
pankajmathur created

Hi, In our earlier MVC5.x project we have written rule in our web config file. Can you please let me know where and how to write this when migrated to .netcore 2.0. Thanks in advance

<system.webServer> <rewrite> <rules> <rule name="Redirect to https"> <match url="(.*)"/> <conditions> <add input="{HTTPS}" pattern="Off"/> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}"/> </rule> </rules> </rewrite> </system.webServer>


1 Answer(s)
  • User Avatar
    0
    pointlevel created

    Hi!

    Read this: <a class="postlink" href="https://www.softfluent.com/blog/dev/Page-redirection-and-URL-Rewriting-with-ASP-NET-Core">https://www.softfluent.com/blog/dev/Pag ... P-NET-Core</a>