-
Notifications
You must be signed in to change notification settings - Fork 230
404 error on reload when deployed to GitHub Pages #787
Comments
Yes, that’s logical. While browsing the app, the URL is changed by In a single-page app the server needs to know the possible URLs as well and respond at least with an HTML page that starts the Chaplin app. Then Chaplin is able to route the URL. See ost.io for example. As far as I know, a catch-all isn’t possible on GitHub pages since they are completely static. On another web server, it’s easier to set up such a server-side logic. |
Ok thanks. Im not able to test now, but will disabling pushstate fix the error or do i need to do something else in addition? Sent from my iPhone On Apr 18, 2014, at 12:09 PM, Mathias Schäfer notifications@github.com wrote:
|
You could use hashChange instead of pushState, so all your urls would look like |
Ok. How do i implement that? Sent from my iPhone On Apr 18, 2014, at 4:34 PM, Adam Krebs notifications@github.com wrote:
|
It's the default in |
Default chaplin has no pushState opts. This worked.
$ ->
console.log 'initializing app'
new Application {
controllerSuffix: '-controller'
routes: routes
pushState: false
} |
Yep yep. |
Ok. Just found a new issue. Links correctly add the |
I have an app that works fine in development mode, but once I deployed to GitHub Pages I get a 404 error anytime I reload or type in the url for any route except the homepage. The weird thing is that the routing works perfectly fine when clicking the links. Does this have anything to do with push state by any chance?
brunch 1.7.13
chaplin 1.0.0
The text was updated successfully, but these errors were encountered: