How can I configure an Amazon S3 static webpage to properly route Angular ui.router html5Mode routes? On page refresh, it will make a request for a file that doesn\'t exist,
In the Frequently Asked Questions, they rewrite almost everything to serve the index.html
page. For HTML5 fallback mode you need to use #!/
(hashbang).
You could change this:
#/
with
#!/
More details on this answer: https://stackoverflow.com/a/16877231/1733117
You may also need to configure your app for using that prefix:
angular.module(...)
...
.config(function($locationProvider) {
$locationProvider.html5Mode(true).hashPrefix('!');
})