Thank to Martijn (@sexybiggetje) , Erik's Link Shortener is up and running :D

For anyone else who wants to have their own easy link shortener:

Amazing! Thanks for all the other suggestions, if I find myself in times of plenty, I might look at it :P

Β· Β· Web Β· 1 Β· 0 Β· 3

@Erik @sexybiggetje

Congrats! But, reading the source, I cannot but wonder: would this not work much easier with a simple .htaccess or nginx redirect-map.conf.

It seems to do the exact same, but with an additional layer of complexity and slowness on top (php).

Not meant as criticism on launching (again: congrats!) just my curiousity after building and hosting several link shorteners myself.

@berkes @Erik

I wasn't sure what the hosting setup was. This allowed me to swap out the .htaccess for another redirect mechanism. I also wasn't sure if Erik would need any other features like link tracking, which could now easily append to it. Simple and effective enough right.

@sexybiggetje @Erik My last shortener has additional POST / and PUT / endpoints that allow creating and replacing urls too (using a hardcoded token as security, lol).

That way, one can manage it with curl or a bookmarklet.

Might be a neat next step?

@sexybiggetje @Erik I've experimented with ephemeral URL shortners too. That don't need any storage.

Some PHP pseudocode to explain the idea here (yes, I haven't written PHP in over 14 years, lol).

Idea is to decode/encode the URL using e.g. base64 or base85 (legibility). I've also tried compression algos, but representing that in url is hard.

It won't shorten much. Most usefull if you can remove the domain from long urls when you only redirect to e.g. your own blog.

Sign in to participate in the conversation
Mastodon U. Twente

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon! Anyone with an or @* email address can create an account on