aboutsummaryrefslogtreecommitdiffhomepage
path: root/astro.config.mjs
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-05 14:17:54 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-11-05 14:17:54 +0900
commitfd377d1df26df4643f8028677b027327d397f121 (patch)
treeba5a9556d5c174916075f0fa5f4c3ac772624242 /astro.config.mjs
parentc43be8eb6718ad4c3019fe150ed395e8c73abf2d (diff)
events: 旧URLの転送をAstro側にも定義
.htaccessは本番のApacheでしか効かず、astro devでは旧URLが404に なっていた。config の redirects と動的ルートで同じ301転送を用意した。
Diffstat (limited to 'astro.config.mjs')
-rw-r--r--astro.config.mjs7
1 files changed, 7 insertions, 0 deletions
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,