Closed arby50 closed 5 years ago
after further investigating, this is an IIS issue. Or at least, I have the IIS solution. By adding a web.config to the root of the /www folder that contained the following rewrite:
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/index.html" />
</rule>
</rules>
</rewrite>
the web pages are viewable. I had to install the URLRewrite extension for IIS 7 also. Posting in case it helps someone else deploying to IIS.
Resources: Before submitting an issue, please consult our docs.
Stencil version: (run
npm list @stencil/core
from a terminal/cmd prompt and paste output below):I'm submitting a ... (check one with "x") [X ] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
Current behavior: app works on localhost as expected. When deployed, the "Profile Page" link button properly redirects to "/profile/ionic". However, refreshing the page produces a 404. Refreshing the same page on localhost does not.
Expected behavior: localhost and production refresh should both result in the refreshed page.
Steps to reproduce: clone and build the PWA toolkit npm start click "Profile Page" on resulting web page, view page Refresh page run 'npm run-script build' deploy the www folder to a production environment. click "Profile Page" on resulting web page, view page Refresh page<-404
Related code:
Other information: