I'm currently unable to make React Routing working in azurewebsites.net. Everything works smoothly in localhost, but when I deploy the application to Azure Routing stops working.
Application shows default frontpage ex. "example.azurewebsites.net" but if I try to open "example.azurewebsites.net/about" I get "Cannot GET (urlparam)" error.
I tried to add the following file called web.config under public folder, but it doesn't seem to help.
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Does anyone have an idea how to fix this? Please ask if something from the code is needed, I'm not sure what else I should provide here.