We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ca13b5 commit 1d41365Copy full SHA for 1d41365
packages/@vuepress/core/src/app/prepare/preparePagesRoutes.ts
@@ -27,10 +27,12 @@ ${app.pages
27
// redirect from decoded path
28
redirectsSet.add(decodeURI(path))
29
30
- // redirect from index path
31
- if (/\/$/.test(path)) {
32
- const indexPath = path + 'index.html'
33
- redirectsSet.add(indexPath)
+ if (path.endsWith('/')) {
+ // redirect from index path
+ redirectsSet.add(path + 'index.html')
+ } else {
34
+ // redirect from the path that does not end with `.html`
35
+ redirectsSet.add(path.replace(/.html$/, ''))
36
}
37
38
// redirect from inferred path
0 commit comments