路由定义如下
let routes = (
<Route handler={App}>
<Route path="/" component={App}>
<Route path="/search/:id/:page" component={Search} />
</Route>
</Route>
);
其他功能都对,就是刷新还有直接打开http://localhost/search/66/1的时候找不到url。必须先进http://localhost在跳转到/search/66/1。
url怎么没有井号呢?
你上面的那个问题还没碰到过
至于没有
#
,我想到的是可能与history有关,现在我配置的都是history={browserHistory}
,如果是hashHistory 的应该才有#
,具体可以看看官方介绍这是中文文档 但是中文文档后期的维护比较慢,很多新的东西都没有跟新