userid redirect for Mastodon

I thought it would be convenient to have a automatic redirect to the mastodon url on your own server so that following another user direct via link could work instead of copying the profile url and pasting it into your own mastodon instance search field (remote follow)

This is currently a small PHP script that asks for the homeserver name and sets a cookie so that you only have to do that once

It is running on the URL and works by adding the userid or profile link to the end of it

e.g.[email protected],[email protected]


Parsing of the URL relies on the @ chars, so the short form of Pixelfed does not work (, also other formats will fail)

The script is currently a quick first shot, it has not much error handling and will likely fail for some, also there is no way to delete the cookie, so this has to be done manually.

I should mention that I came up with the idea when I used the redirect for a matrix group

If you like you can PM me as @[email protected]