On PathLocationStrategy when i'm reload page then getting 404 page not found. and I don't want to use HashLocationStrategy.
Asked
Active
Viewed 389 times
1
-
Please add additional information about your issue. – Zeev Katz Feb 06 '18 at 07:08
-
ex.www.example.com/page1 so when I'm reloading then getting 404 error. – Nirav Joshi Feb 06 '18 at 08:50
1 Answers
1
Copy there redirection rule
under static web hosting
in s3
<RoutingRules>
<RoutingRule>
<Condition>
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals>
</Condition>
<Redirect>
<Protocol>http</Protocol>
<HostName>Copy Endpoint Link under static web hosting</HostName>
<ReplaceKeyPrefixWith>#/</ReplaceKeyPrefixWith>
</Redirect>
</RoutingRule>
</RoutingRules>
Check this answer of mine, you need to make some changes in angular code too

Rakesh Chand
- 3,105
- 1
- 20
- 41