1

On PathLocationStrategy when i'm reload page then getting 404 page not found. and I don't want to use HashLocationStrategy.

zgue
  • 3,793
  • 9
  • 34
  • 39
Nirav Joshi
  • 111
  • 9

1 Answers1

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

AngularJS $routeProvider doesn't route properly

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