Caddy + AstroJS subdomain redirect
I have a project built in AstroJS & Payload CMS.
In Astro I am serving up routes for the main domain e.g
/en
and routes which should belong on a subdomain eg /en/site/*
The intention is that en/site
is unavailable to the main domain
and the subdomain always defaults to en/site/*
Could I achieve this with Caddy? I was going to add this template to my project https://railway.app/template/wifz4K5 Replies
Project ID:
38aae1e6-ddf3-4d10-a02b-a590e97275f4
38aae1e6-ddf3-4d10-a02b-a590e97275f4
the template you link would provide a good way for you to deploy caddy with a Caddyfile to railway, but what you are talking about doing would be quite an involved process and you would need to have quite a good understanding of caddy and the Caddyfile syntax to achieve this
I've come up with the following:
I might have mixed up the Railway variables. I will give this a go in a new railway environmen
I think Astro middleware would even suffice.
I'm going to mark this as solved and move the discussion to Astro discord.
sounds good!