Url rewriting in Amazon S3

Finally I found a solution to my problem in this other question:

https://stackoverflow.com/questions/16267339/s3-static-website-hosting-route-all-paths-to-index-html

The goal is use this config in the Redirection Rules:

<RoutingRules>
  <RoutingRule>
    <Condition>
    <HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals >
     </Condition>
    <Redirect>
      <HostName>yourdomainname.com</HostName>
      <ReplaceKeyPrefixWith>#!/</ReplaceKeyPrefixWith>
    </Redirect>
  </RoutingRule>
</RoutingRules>