I'm getting backbone router to work
App.Router = Backbone.Router.extend({
routes: {
"todo": "todo"
},
todo: function() {
alert(1);
}
});
Backbone.history.start();
This works well when I goto url : domain:port/#/todo
I want this to work without # in the URL, I tried putting pushState parameter as mentioned in the documents.
Backbone.history.start({pushState: true});
This simply redirects # url to the non hashed one
domain:port/#/todo (redirects to ==>) domain:port/todo
But when I visit this URL directly
domain:port/todo
it doesn't work: "Cannot GET /todo".
Is there any way, I can make this URL work without # in it?