Skip to content
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

Set up redirect mapping #1012

Open
hypha opened this issue Feb 17, 2025 · 3 comments
Open

Set up redirect mapping #1012

hypha opened this issue Feb 17, 2025 · 3 comments
Assignees

Comments

@hypha
Copy link
Contributor

hypha commented Feb 17, 2025

Also, would it be good to set up a redirect in case we want to promote this on social media?

Yeah, we can set up a redirect. But to be honest I wasn't expecting to have this number of redirects, so it may be better to set up a mapping in the code instead of a page for each redirect.

For now we can just create that redirection page, and I'll look into how we can do it with a mapping later.

Originally posted by @egeakman in #995 (comment)

@egeakman
Copy link
Member

When using https://docs.astro.build/en/guides/routing/#redirects, I realized that with the site configuration, it redirects to <site>/destination instead of /destination which doesn't work well with local builds or previews. @nikoshell Is there something we can do for that?

@nikoshell
Copy link
Contributor

nikoshell commented Mar 27, 2025

<site>/destination is fine from my perspective. I think we should just setup correct <site> for local or preview.
I add to #1068 param SITE_URL which can help with that.

@nikoshell
Copy link
Contributor

BTW, critical redirects should be managed by Nginx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants