-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove /#/ from URL #71
Comments
References, looks like we'll need some support from @matthewberryman server side, I haven't completely got my head around how push state works. (1) https://discoveraurelia.com/tutorials/supporting-pushstate-nice-urls/ |
I have set up cloudfront for petabencana.id as per https://keita.blog/2015/11/24/hosting-a-single-page-app-on-s3-with-proper-urls/ to support this—it's currently being deployed (ETA in a few minutes from time of this comment). It's a bit of a hack, and means that 404 error handling in #57 needs to be done by aurelia. |
Hi guys - you should be able to get this working using the advice here http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/cheat-sheet/7. So in the aurelia router:
Then in Cloudfront config you will need to redirect all 404s and 403s to /index.html and return status as 200. @matthewberryman I see you are just doing this for 404s currently however AWS is returning a 403 if you call something it does not know about e.g. https://petabencana.id/hello - I have amended the Cloudfront config for dev to do both, if this works OK you will need to do the same for the other Cloudfront dists |
Just tried this out locally with latest dev branch and can't seem to get it working, also included in index.html head section as advised in the docs. Not sure why this is not playing ball, will continue to investigate |
It looks like this approach does work however the code you have for routing is then overriding and putting the # back in. Suggest looking at <a route-href.. logic in aurelia for linking between pages. The change to index.html required to make this work is as follows:
|
Fixed in ef36332 |
Reopening until I've made the corresponding 403 change in CF (soon) |
Done in our prod environment (and @mgvarley had already made the change in dev as noted). Will take a few minutes for CF to pick up the change. |
No description provided.
The text was updated successfully, but these errors were encountered: