vendredi 9 janvier 2015

Deploying ember-cli app to S3 without breaking URLs

I'm working on a ember-cli app that I am deploying in S3. I would really like to be able to use this 'serverless' approach, as it is extremely simple to configure, and extremely affordable.


I have a problem with URLs. If I hit http://ift.tt/1x3r4LA it works just fine. But if I try to load a page other than the root of the application, such as http://ift.tt/17pOC8w, then it gives a 403, as there is no such resource in S3.


Looking for solutions, I find suggestions to add #! to my path. This seems better, as it doesn't return a 403, but when I hit http://ift.tt/1x3r6Dh, it simply redirects to http://ift.tt/1x3r4LA, losing any specific information that the path contained.


What are my options? Is there a way to use S3 and have working URLs? Do I need a server? Or is there another approach that has eluded me?





Aucun commentaire:

Enregistrer un commentaire