3 ms·
Is there a way to redirect all[1] requests to index.html? The use case is an Ember app that uses history location and is deployed as a static website. In this c
by mehulkar 13y ago
Is there a way to redirect all[1] requests to index.html? The use case is an Ember app that uses history location and is deployed as a static website. In this case, requests to `/whatever` still need to serve index.html and let Ember handle the routing. Can GAE app.yaml specify rules like this?
I ran into this problem with S3 and ended up writing a simple server to handle it and deploying to Heroku.
[1] By all, I mean all except the ones to /assets or something similar.
- toomuchtodo 13y agoDid you try using Cloudfront with S3? I believe it solves the problem you detailed with regards to redirects.
- mehulkar 13y agoNope, didn't try Cloudfront. I'll look into it, thanks!
- toomuchtodo 13y agoIf you still run into problems, reply back to this and I can get in touch to help (no cost).
- rza 13y agoSomething like this? handlers: - url: /.* mime_type: text/html static_files: static/index.html upload: static/index.html Anything you don't want to go to index.html you can just put before that handler since it processes the app.yaml from top to bottom and stops at the first match.