#What happened to experimental flag redirect?
7 messages · Page 1 of 1 (latest)
Hi @ocean portal. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
The experimental flag redirects was introduced in Astro 2.6 to allow developers to more easily add redirects in their projects. To use it, you need to enable the flag in your project configuration file. Here's an example of how to do it:
// astro.config.mjs
import { defineConfig } from "astro/config"
export default defineConfig({
redirects: {
"/old": "/new",
},
experimental: {
redirects: true,
},
})
This feature aims to provide a single API for managing your redirects directly in your Astro config. It works across development and production and can be optimized even further to a specific host using Astro's existing adapter API. For instance, the Netlify adapter will automatically convert your redirects into a Netlify-specific _redirects file for the fastest-possible performance via their CDN.
Astro is looking for feedback during this experimental period, so you're encouraged to try it and share your experience with them on Discord (https://astro.build/chat).
You can find more information about this in the Astro 2.6 blog post (https://astro.build/blog/astro-260).
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@ocean portal kapa.ai is still learning and improving, please let us know how it did by reacting below
@tight jolt is it still available in version 2.8.0?
Let me check the knowledge base for you. One moment! :books: