0
我的spa實際上只是一個使用自定義模板的正常wordpress頁面。在WordPress內部的Angular SPA中使用html5Mode - ngRoute返回一個404
頁嵌條/ singlepageapp /所以我的基礎:是<base href="/singlepageapp/">
使用$ routeProvider我可以在我的觀點點擊沒有問題,但如果我嘗試打網址冷http://mysite/singlepageapp/singleview我得到一個404由於WordPress的不通過spa頁面路由這些頁面。
我是否需要特殊的htaccess重寫規則或我怎麼能得到相當的URL在我的水療中心頁面出404的
我
$routeProvider.
when('/', {
templateUrl: '/wp-content/themes/mytheme/templates/map.html',
controller: 'VPListCtrl'
}).
when('/:slug', {
templateUrl: '/wp-content/themes/mytheme/templates/detail.html',
controller: 'VPDetailCtrl'
}).
otherwise({
redirectTo: '/'
});
$locationProvider.html5Mode(true);