I wanted to get rid of ugly hash tags in my url (www.example.com/#/projects/id -> www.example.com/projects/id). So I added
Router.reopen({
location: 'history'
});
This works if I open my app to the root www.example.com, and click on a link-to I can visit www.example.com/projects and so on. However, if I put www.example.com/projects in my url bar and load the page that way, we get a 404 error. It makes sense to me why that would happen (after all, the server is only serving the javascript assets on the one url). I'm using github pages for my site, what approach should I use to make this work?
Basically your server needs to serve your index.html file no matter what url is entered.
Keep in mind that your server must serve the Ember app at all the routes defined here.
More in the docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With