sintaxi / surge

CLI for the surge.sh CDN
https://surge.sh
2.88k stars 136 forks source link

Getting 404 Page Not Found errors on certain pages #266

Open jamesvphan opened 7 years ago

jamesvphan commented 7 years ago

I have an app that is running on (http://simple-pen.surge.sh). This is built with React/Redux for Front-end and Rails for back-end. When I get on the site, I can either sign-up or sign-in and issue a JWT token for the user. Once logged in, I have a set of notebooks I can view. However, it's only when clicking on a notebook, I get redirected to a 404 Page Not Found error.

Here are the steps I followed to get this on surge: -Ran "npm run build" inside project folder -Ran surge on the build folder that was generated. -Got the "Success! Project is published and running at simple-pen.surge.sh" comment

I'm not sure why I get an error when making the GET request to certain pages. Trying to access "http://simple-pen.surge.sh/notebooks/1/notes" url, but fails. In one scenario, I have it set so if the user is logged in, the "simple-pen.surge.sh" root path redirects the user to their notebooks route i.e. "http://simple-pen.surge.sh/notebooks" which renders the page, but when I make an actual request for this URL directly, I then get the error.

Any help or knowledge as to why this is occurring would be great!

tephenavies commented 7 years ago

See http://surge.sh/help/adding-a-200-page-for-client-side-routing

jofftiquez commented 6 years ago

The doc says it's compatible with angular, react and ember. Will this work with vuejs?