vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.16k stars 922 forks source link

[Bug report] when use the url with anchor then refresh the page, vuepress will return 404 page #1568

Closed Daiyangcheng closed 1 month ago

Daiyangcheng commented 1 month ago

Description

when i visit my website with anchor, vuepress return a 404 page to me

Reproduction

http://58.49.146.73:64521/app/account#%E5%AE%9E%E5%90%8D-%E5%AE%9E%E4%BA%BA%E8%AE%A4%E8%AF%81

Used Package Manager

npm

System Info

System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (8) x64 Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz
    Memory: 5.76 GB / 7.75 GB
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 20.11.1 - /usr/bin/node
    Yarn: Not Found
    npm: 10.8.0 - /usr/bin/npm
    pnpm: Not Found
    bun: Not Found
  Utilities:
    Git: 2.39.2 - /usr/bin/git
  Browsers:
    Chrome: Not Found
  npmPackages:
    @vuepress/bundler-vite: ^2.0.0-rc.11 => 2.0.0-rc.11 
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli:  2.0.0-rc.11 
    @vuepress/client:  2.0.0-rc.11 (2.0.0-rc.9)
    @vuepress/core:  2.0.0-rc.11 (2.0.0-rc.9)
    @vuepress/markdown:  2.0.0-rc.11 (2.0.0-rc.9)
    @vuepress/shared:  2.0.0-rc.11 (2.0.0-rc.9)
    @vuepress/utils:  2.0.0-rc.11 (2.0.0-rc.9)
    vue:  3.4.27 
    vue-router:  4.3.2 
    vuepress: ^2.0.0-rc.11 => 2.0.0-rc.11
Mister-Hope commented 1 month ago

https://github.com/vuepress/core/issues/1561

Daiyangcheng commented 1 month ago

is this problem fixed?

meteorlxy commented 1 month ago

@Daiyangcheng Should have been fixed in v2.0.0-rc.12

digital-codes commented 1 month ago

URLs like http://localhost:9000/about.html#fnref2 and localhost/news.html?id=2 work OK now