-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Direct links doesn't open when for routerMode: 'history' #238
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
Comments
I'm also having this issue |
same issue |
it seems it has not been solved for over one year?? If so, just remove the configuration from the docs |
my fault, we should set the server side, see https://router.vuejs.org/guide/essentials/history-mode.html#example-server-configurations I think the author should explain it for the green hand like me |
@hanzichi, do you know how to configure for github pages? |
@jsmedmar I think you can only use hash mode for github pages |
@dmytrodanylyk @jsmedmar any idea how can I get this working while running in development mode using docsify serve where I do not have any server side configurations. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@judeantony Did u find a way to run in dev mode ? |
Brilliant little hack, thank you. This should be pointed out in the official documentation. |
Here is the 404.html redirect trick for GitHub Pages. But note, without providing a sitemap to Google, Google will not index those pages because it ignores pages with a 404 status by default. https://github.com/rafgraph/spa-github-pages If you're using a static server, there may be a rewrite rule you can set to forward all requests to a particular file. F.e. with Vercel, instead of the 404.html trick, you can forward to /index.html internally, and the browser will not receive a 404 code. For Vercel, the vercel.json might look like so: {
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
} |
When I set
routerMode: 'history'
and open direct linkhttp://localhost:3000/buttons
I see error page with textCannot GET /buttons
.When I open
http://localhost:3000
and click on buttons, it navigate me tohttp://localhost:3000/buttons
and render it correctly. Any idea how to fix this?The text was updated successfully, but these errors were encountered: