Skip to content

fix: redirect any github 404 to our custom 404 page #397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2020

Conversation

zebateira
Copy link
Contributor

Closes #388

This should fix the 404 gibhub page showing.
@terichadbourne what we discussed regarding redirecting valid urls to hash urls would be a bit more tricky (e.g. /tutorials -> /#/tutorials) since it would still rely on the 404 hack #393

@zebateira zebateira added the bug Something isn't working label Feb 27, 2020
@terichadbourne
Copy link
Member

@zebateira To attempt to proof this one I used:

npm run build
npm install -g serve
serve -s dist

I got it running from dist but http://localhost:5000/404 redirects to http://localhost:5000/404#/ which is the homepage, not http://localhost:5000/#/404, our custom 404 page. I’m happy to assume this is a weird testing limitation and just merge and check when it’s live if you’re confident it’s set up as needed. Let me know what you recommend.

@zebateira
Copy link
Contributor Author

@terichadbourne weird behaviour from serve. I used this and it worked as it should:

npm run build && npx http-server dist -p 3000

Copy link
Member

@terichadbourne terichadbourne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working perfectly now!

@terichadbourne terichadbourne merged commit 94eb6ea into code Feb 28, 2020
@terichadbourne terichadbourne deleted the fix/github-404-page branch February 28, 2020 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Loading GitHub default 404
2 participants