Redirecting

While working on my #API, I figured out a way to set up a system of dynamic redirects with alias matching. This means I can define multiple links that all redirect to a specific URL, for example /instagram, /ig and /insta all redirect to my instagram profile. The advantage of this is that I don’t have to remember a specific term, any other synonym I defined will work too.

This was made possible by setting up a second domain (muensterer.link), that forwards requests to the /redirect route of my #API. I also modified the 404 page on my homepage to automatically attempt a redirect if the page does not exist.

It even passes on the rest of the URL, so instead of going https://github.com/dnnsmnstrr/dotfiles I can just type muensterer.link/gh/dotfiles. This “autoexpansion” of URL components has proven to be very useful.

There are different ways to access these redirects:

Ideas

  • check for fallbacks in projects and notes (Github API)