Watched through few topics on same question. None worked for me. The thing is: I have ReactJS + Redux app designed from create-react-app. Actually it works but when app surfing starts with URL different from root is throws out 404. Installed iisnode and tried out different rewrite rules recommended in web, but nothing works. Last was this one:
<rule name="Redirect HTTP to HTTPS">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent"/>
</rule> -->
<rule name="Redirect non-existent paths to root">
<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="^/initialLogin/*" ignoreCase="true" negate="true" />
</conditions>
<action type="Redirect" url="/" appendQueryString="false" />
</rule>
</rules>
</rewrite>
The only thing I need is to send all incoming requests through root url with passing the rest of the address to it so that SPA could work properly. Hosting: AzureVM IIS: v10
via user3493623
No comments:
Post a Comment