Skip to content

Instantly share code, notes, and snippets.

@extrabacon
Created October 22, 2015 12:15
Show Gist options
  • Save extrabacon/141426a3a742130cb069 to your computer and use it in GitHub Desktop.
Save extrabacon/141426a3a742130cb069 to your computer and use it in GitHub Desktop.
S3 Hosting for HTML5 apps
<script>
history.pushState({}, "entry page", location.hash.substring(1));
</script>
<RoutingRules>
<RoutingRule>
<Condition>
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals>
</Condition>
<Redirect>
<HostName>yourdomainname.com</HostName>
<ReplaceKeyPrefixWith>#!/</ReplaceKeyPrefixWith>
</Redirect>
</RoutingRule>
</RoutingRules>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment