Skip to content
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

HTTP ERROR 404 on Page Reload #4518

Closed
4 tasks done
leeshhi opened this issue Jan 25, 2025 · 4 comments
Closed
4 tasks done

HTTP ERROR 404 on Page Reload #4518

leeshhi opened this issue Jan 25, 2025 · 4 comments
Labels
need more info Further information is requested

Comments

@leeshhi
Copy link

leeshhi commented Jan 25, 2025

Describe the bug

Hey i got a issue on my fresh installed vitepress..
I can reload the main page "index" as often i want it works, but as soon i go into a "docs" page "https://example.com/introduction/getting-started" i get a HTTP ERROR 404 on reload everytime ..
does someone know, why ?

Reproduction

as soon i go into a "docs" page "https://example.com/introduction/getting-started" i get a HTTP ERROR 404 on reload everytime ..

Expected behavior

Reload page normal without issues.

System Info

System:
    OS: Linux 6.12 Debian GNU/Linux trixie/sid
    CPU: (2) x64 AMD EPYC 7543 32-Core Processor
    Memory: 3.20 GB / 3.84 GB
    Container: Yes
    Shell: 5.2.37 - /bin/bash
  Binaries:
    Node: 22.13.1 - /usr/bin/node
    npm: 11.0.0 - /usr/bin/npm
    pnpm: 10.0.0 - /usr/bin/pnpm
  npmPackages:
    vitepress: ^1.6.3 => 1.6.3

Additional context

No response

Validations

@leeshhi leeshhi added the bug: pending triage Maybe a bug, waiting for confirmation label Jan 25, 2025
@leeshhi
Copy link
Author

leeshhi commented Jan 25, 2025

package.json:

{
  "devDependencies": {
    "vitepress": "^1.6.3"
  },
  "scripts": {
    "docs:dev": "vitepress dev docs --host",
    "docs:build": "vitepress build docs",
    "docs:preview": "vitepress preview docs"
  },
  "dependencies": {
    "medium-zoom": "^1.1.0"
  }
}

@leeshhi
Copy link
Author

leeshhi commented Jan 25, 2025

Update:
Seems to happen on a "dead link" in the page .. when you ignoring deadlinks
Nvm

Update 2:

  • seems like if i use "cleanUrls" it wont be able to reload the page..

@leeshhi leeshhi closed this as completed Jan 25, 2025
@leeshhi leeshhi reopened this Jan 25, 2025
@brc-dd
Copy link
Member

brc-dd commented Jan 25, 2025

How/where are you deploying your site? VitePress cannot control your server behavior. For cleanUrls you need server to handle non .html routes.

https://vitepress.dev/reference/site-config#cleanurls
https://vitepress.dev/guide/routing#generating-clean-url

@brc-dd brc-dd added need more info Further information is requested and removed bug: pending triage Maybe a bug, waiting for confirmation labels Jan 25, 2025
@leeshhi
Copy link
Author

leeshhi commented Jan 25, 2025

Yea saw that i fixed it with try_files {path} {path}.html in my caddy config

@leeshhi leeshhi closed this as completed Jan 25, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants