-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editable redirects #64
Labels
v1
Head Start v1 private
Comments
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 Which prompts this modal when selecting an Internal Link: Notes:
|
jbmoelker
added a commit
that referenced
this issue
Jan 20, 2024
jbmoelker
added a commit
that referenced
this issue
Jan 20, 2024
# Changes - Adds editable redirects to the CMS (Redirect Rule model). - Adds postbuild script to download redirects and save to a `_redirects` file. - Adds documentation on routing, including redirects. # Associated issue Resolves #64 # How to test 1. Review the new Redirect Rules model in the CMS 2. Create or edit Redirect Rules in the CMS (requires rebuild to take effect) 3. Open the preview deployment 4. Verify that the redirect rules work (also try reordering them): - [`/redirect-placeholder/:slug/`](https://ca6875c4.head-start.pages.dev/redirect-placeholder/overview-page/) -> [`/en/overview-page/`](https://ca6875c4.head-start.pages.dev/en/overview-page/) - [`/redirect-wildcard/*`](https://ca6875c4.head-start.pages.dev/redirect-wildcard/overview-page/demos/tables/) -> [`/en/overview-page/demos/tables/`](https://ca6875c4.head-start.pages.dev/en/overview-page/demos/tables/) - [`/redirect-order/*`](https://ca6875c4.head-start.pages.dev/redirect-order/any-slug/) -> [`/nl/`](https://ca6875c4.head-start.pages.dev/nl/) - [`/redirect-order/static-slug/`](https://ca6875c4.head-start.pages.dev/redirect-order/static-slug/) -> [`/nl/gedeeltelijke-pagina-layouts/`](https://ca6875c4.head-start.pages.dev/nl/gedeeltelijke-pagina-layouts/) # Checklist - [x] I have performed a self-review of my own code - [x] I have made sure that my PR is easy to review (not too big, includes comments) - [x] I have made updated relevant documentation files (in project README, docs/, etc) - [x] I have added a decision log entry if the change affects the architecture or changes a significant technology - [x] I have notified a reviewer <!-- Please strike through and check off all items that do not apply (rather than removing them) -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.The text was updated successfully, but these errors were encountered: