@tchambers you don’t need to rewrite anything, and the rewrite is harmful when copied. you could at best write two links to the same resource, one https: (for copying and sharing as normal) and one web+mastodon: (for loading the mastodon-specific “authorize interaction” endpoint when clicked, provided you registered it ahead-of-time at a browser and/or os level)
the problem is that you need to explain to users why there are two links, and the web+mastodon: link shouldn’t be copied/shared.