From fd377d1df26df4643f8028677b027327d397f121 Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Thu, 5 Nov 2026 14:17:54 +0900 Subject: events: 旧URLの転送をAstro側にも定義 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .htaccessは本番のApacheでしか効かず、astro devでは旧URLが404に なっていた。config の redirects と動的ルートで同じ301転送を用意した。 --- astro.config.mjs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'astro.config.mjs') diff --git a/astro.config.mjs b/astro.config.mjs index 03c5b9e..6b6406b 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -87,6 +87,13 @@ export default defineConfig({ base: "/", trailingSlash: "always", compressHTML: true, + // 旧URLからの転送。本番は .htaccess が301で返すが、astro dev / preview では + // .htaccess が効かないため、ここでも同じ転送を定義しておく。 + redirects: { + "/kodaira-data/hp-archive/schedule": "/kodaira/events/", + "/kodaira-data/schedule": "/kodaira/events/", + "/kodaira-data/events": "/kodaira/events/", + }, image: { layout: "constrained", responsiveStyles: true, -- cgit v1.3.1