diff options
author | 2025-03-11 13:19:19 +0100 | |
---|---|---|
committer | 2025-03-11 12:19:19 +0000 | |
commit | 615ae29a6f2ee62293d4617cbfc4980d335495d9 (patch) | |
tree | 1f35f161dae29618919e1560fd22f15e071c11bf | |
parent | 6b8fdb8a113b6f76448b41beb990c33fafb09b3e (diff) | |
download | astro-615ae29a6f2ee62293d4617cbfc4980d335495d9.tar.gz astro-615ae29a6f2ee62293d4617cbfc4980d335495d9.tar.zst astro-615ae29a6f2ee62293d4617cbfc4980d335495d9.zip |
Docs: Clarify redirects use case (#13370)
Those changes give visibility to the fact that the use case to redirect from a folder to a file is not supported.
https://github.com/withastro/astro/issues/12532#issuecomment-2703410890
Co-authored-by: ematipico <602478+ematipico@users.noreply.github.com>
-rw-r--r-- | packages/astro/src/types/public/config.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/astro/src/types/public/config.ts b/packages/astro/src/types/public/config.ts index 6da365400..eb64a268e 100644 --- a/packages/astro/src/types/public/config.ts +++ b/packages/astro/src/types/public/config.ts @@ -264,7 +264,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * When redirects occur in production for GET requests, the redirect will be a 301 (permanent) redirect. For all other request methods, it will be a 308 (permanent, and preserve the request method) redirect. * * Trailing slashes on prerendered pages are handled by the hosting platform, and may not respect your chosen configuration. - * See your hosting platform's documentation for more information. + * See your hosting platform's documentation for more information. You cannot use Astro [redirects](#redirects) for this use case at this point. * * ```js * { @@ -297,7 +297,8 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * '/news': { * status: 302, * destination: 'https://example.com/news' - * } + * }, + * // '/product1/', '/product1' // Note, this is not supported * } * }) * ``` @@ -321,6 +322,8 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * }, * } * }) + * + * * ``` */ redirects?: Record<string, RedirectConfig>; |