Wildcard redirect?

When creating a redirect, is it possible to use some kind of pattern substitution? A concrete example – I’d like to move a site, https://example.tld, to micro.blog, but it has an existing mastodon installation at social.example.tld. In order to use mastodon names like user@foo.tld, I have this (apache) redirect to forward webfinger requests to the right place.

RewriteEngine On
RewriteRule ^.well-known/webfinger(.*)$ https://social.example.tld/.well-known/webfinger$1 [L,R=301]

Basically it takes everything after the ‘webfinger’ bit and sticks that on the new URL at the service ‘social.example.tld’.

Is that kind of thing supported for redirects on micro.blog?

Redirects with patterns like that aren’t possible right now. Is this a single-user Mastodon instance or are there multiple users? If it’s just you, you might be able to redirect everything from .well-known/webfinger and it will still work, but I’m not sure.

This WebFinger example might be something we want to have built-in support for in the future, too.

Thanks for the info Manton. It’s a small instance, but there are a handful of accounts. Sounds like I should just keep the main site at a traditional hosting place for now and just host the blog at micro.blog. No problem there, just checking if I could consolidate to one host, since the site is really just a handful of pages plus the blog.

Okay, thanks for the info. I’ll give this some thought so that it will be easier to migrate later for those types of situations. I think WebFinger is common enough that having special support for that would be convenient.