Closed ozasadnyy closed 9 years ago
I'm not sure what's wrong without seeing the code. Is the server returning a 404? Are you importing the pushstate-anchor
element? If you're using non-hash paths, the server needs to be able to return a page when the user goes directly to the page's URL.
Re: Are you importing the pushstate-anchor element? It was a question actually if should I include it or not, because I have found anything about it.
Yeah, you'll need to include it if you want it to use history.pushState()
instead of loading a new page. That said, if you use pushState, your server needs to be able to return a page when you go to /about
or you will get a 404. Hash URLs are simpler to deal with but regular URLs look better. That's the trade off.
So I can't use GitHub pages for this purpose?
Not with the pushstate-anchor. You'd need to use hash URLs for sites that only serve up static content.
ok, thanks a lot for your time!
Thanks for the project, but after I am clicking on link:
I am redirecting to
/about
page that doesn't exist.Should I include pushstate-anchor to make it work?
Router settings:
I am using BrowserSync as a local server from