Setting Up Redirects

With `fastn` you can set up redirects for you site. This can be used to create short urls e.g. `/t` to redirect to your twitter handle, e.g. `https://twitter.com/` etc, or you can use it to fix broken URLs in case you change your mind about some URL. This can be done by using `fastn.redirects` in your `FASTN.ftd` file.
`FASTN.ftd` example that uses `fastn.redirects`
-- import: fastn
-- fastn.package: redirect-example

-- fastn.redirects:

/ftd/kernel/: /kernel/
/discord/: https://discord.gg/eNXVBMq4xt
Lang:
ftd
The links which needs to be redirected somewhere has to be listed down in the body section of `fastn.redirects` as `key-value` tuples in the format `: `. In the above example, the url `/ftd/kernel/` will be redirected to `/kernel/`. Similarly, visiting `/discord/` will redirect to the official `fastn` discord server [https://discord.gg/eNXVBMq4xt](https://discord.gg/eNXVBMq4xt).

Dynamic Redirect

You can also conditionally redirect from any web page, check out [`ftd.redirect`](/ftd/redirect/).

Support `fastn`!

Enjoying `fastn`? Please consider giving us a star ⭐️ on [GitHub](https://github.com/fastn-stack/fastn) to show your support!
[⭐️](https://github.com/fastn-stack/fastn)

Getting Help

Have a question or need help? Visit our [GitHub Q&A discussion](https://github.com/fastn-stack/fastn/discussions/categories/q-a) to get answers and subscribe to it to stay tuned. Join our [Discord](https://discord.gg/a7eBUeutWD) channel and share your thoughts, suggestion, question etc. Connect with our [community](/community/)!
[💻️](/community/)

Found an issue?

If you find some issue, please visit our [GitHub issues](https://github.com/fastn-stack/fastn/issues) to tell us about it.

Quick links:

- [Install `fastn`](install/) - [Create `fastn` package](create-fastn-package/) - [Expander Crash Course](expander/) - [Syntax Highlighting in Sublime Text](/sublime/)

Join us

We welcome you to join our [Discord](https://discord.gg/a7eBUeutWD) community today. We are trying to create the language for human beings and we do not believe it would be possible without your support. We would love to hear from you.
Copyright © 2023 - [FifthTry.com](https://www.fifthtry.com/)