2012-07-19 167 views
2

我不能修改服務器的htaccess並想使用骨幹路由器。 問題是我卡在一個靜態html文件的url(index.html)骨幹路由器需要忽略「index.html」

如何讓Backbone忽略index.html?

在此先感謝。

var Router = Backbone.Router.extend({ 
    routes : { 
     "page-one" : "pageOne" 
    }, 
    pageOne : function(){}, 
    pageTwo : function(){}, 
    pageThree : function(){} 
}); 

scn.router = new Router(); 

Backbone.history.start({root: "/Backbone/index.html"}); 

我在pushState上,我不需要。這是問題所在。目前。

+0

你能告訴我們你的Backbone.Router對象中的路線嗎? – Vikram 2012-07-19 20:01:46

回答

3

pushState是問題所在。我把它關掉了,然後我的問題就解決了。