我想在主域和/the/rest/of/url
.
显然,我做得不对。
我用了:
window.location.hash = location.pathname;
http://www.mybusinesssite.com/path/to/mypage
希望换成http://www.mybusinesssite.com/#/path/to/mypage
相反,我得到http://www.mybusinessite.com/path/to/mypage/#/path/to/my/page
制作它的正确方法是什么http://www.mybusinesssite.com/#/path/to/mypage ?