#What happened to experimental flag redirect?

7 messages · Page 1 of 1 (latest)

ocean portal
#

What happened to experimental flag redirect?

tight joltBOT
#

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

ocean portal
#

@tight jolt is it still available in version 2.8.0?

tight joltBOT
#

Let me check the knowledge base for you. One moment! :books:

#

Hmm, I don't know enough to give you a confident answer yet. The extracts provided do not specify whether the experimental flag redirects is still available in Astro version 2.8.0. I recommend checking the Astro documentation (https://docs.astro.build) or the Astro GitHub repository (https://github.com/withastro/astro) for the most accurate and up-to-date information.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: