mirror of
https://github.com/withastro/astro.git
synced 2025-04-07 23:41:43 -05:00
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>
This commit is contained in:
parent
6b8fdb8a11
commit
615ae29a6f
1 changed files with 5 additions and 2 deletions
|
@ -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>;
|
||||
|
|
Loading…
Add table
Reference in a new issue