Closed jbmoelker closed 6 months ago
I modelled a quick Redirect Rule model in DatoCMS to test reusing the Internal Link model. However I'm stuck figuring out a simple setup as the multi-locale environment makes it difficult. An Internal Link has a different value for each locale. Whereas a simple redirect rule has the same from
and to
for each locale. 🤷 :
Which prompts this modal when selecting an Internal Link:
Notes:
to
model like Redirect Pattern
where someone could enter a pattern like: /new/url?filter=:splat
.:param
and *
-> :splat
).from
value (start with a /
, max one *
, ...)status_code
and the radio buttons produce the values 301
and 302
.
User story
As a content editor, I want to be able to configure redirects in the CMS, so that I can redirect visitors to a new page when one was removed or deleted or I simply wanted a short url for marketing.
System design
from
URL (required)to
URL (required)to
URL (nice to have; this would maketo
URL optional/conditional; possibly reuseInternalLink
model and logic)301
) or temporary (302
) (required,302
default)_redirects
)_redirects
, and Astro has its own redirects setup.