mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
fix(underscore-redirects): fix dynamic pattern regression (#8979)
This commit is contained in:
parent
ea16b45c0d
commit
0ee7c9aac9
2 changed files with 7 additions and 2 deletions
5
.changeset/cuddly-walls-remember.md
Normal file
5
.changeset/cuddly-walls-remember.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/underscore-redirects': patch
|
||||
---
|
||||
|
||||
Fixes a regression which used the wrong pattern for dynamic pages
|
|
@ -100,7 +100,7 @@ export function createRedirectsFromAstroRoutes({
|
|||
}
|
||||
_redirects.add({
|
||||
dynamic: true,
|
||||
input: `${base}${route.pattern}`,
|
||||
input: `${base}${pattern}`,
|
||||
target,
|
||||
status: route.type === 'redirect' ? 301 : 200,
|
||||
weight: 1,
|
||||
|
@ -108,7 +108,7 @@ export function createRedirectsFromAstroRoutes({
|
|||
} else {
|
||||
_redirects.add({
|
||||
dynamic: true,
|
||||
input: `${base}${route.pattern}`,
|
||||
input: `${base}${pattern}`,
|
||||
target: dynamicTarget,
|
||||
status: 200,
|
||||
weight: 1,
|
||||
|
|
Loading…
Reference in a new issue