#i18n site root is 404 when deployed

2 messages · Page 1 of 1 (latest)

red jetty
#

I am maintaining an astro site using i18n and deploying with sst.

this my astro conf:

import { defineConfig } from 'astro/config'
import aws from 'astro-sst'
import tailwind from '<@&1055234544183287879>/tailwind'
import svelte from '<@&1055234544183287879>/svelte'
import mdx from '<@&1055234544183287879>/mdx'

// https://astro.build/config
export default defineConfig({
output: 'hybrid',
site: 'https://my-site.com',
integrations: [tailwind(), svelte(), mdx()],
i18n: {
defaultLocale: 'en',
locales: ['en', 'it'],
routing: {
prefixDefaultLocale: true,
redirectToDefaultLocale: true
}
},
adapter: aws()
})

this my sst conf:

import type { SSTConfig } from 'sst'
import { AstroSite } from 'sst/constructs'

export default {
config(_input) {
return {
name: 'my-site',
region: 'eu-west-1'
}
},
stacks(app) {
app.stack(function Site({ stack }) {
const site = new AstroSite(stack, 'carbon-footprint-test')
stack.addOutputs({
url: site.url
})
})
}
} satisfies SSTConfig

If I go to https://my-site.com/ I get a 404, if I visit https://my-site.com/index.html I get the expected index page, the source of which is under pages/index.astro.

how do I fix and make https://my-site.com/ point to my index page?

clear boneBOT
#

Hi @red jetty. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: