Skip to content

Instantly share code, notes, and snippets.

@dotsam
Created February 9, 2023 23:35
Show Gist options
  • Save dotsam/2f56a9618b513f65cf4956efac982ac1 to your computer and use it in GitHub Desktop.
Save dotsam/2f56a9618b513f65cf4956efac982ac1 to your computer and use it in GitHub Desktop.
Mastodon Webfinger Redirect/Alias
RewriteCond %{REQUEST_URI} ^/\.well-known\/webfinger$ [NC]
RewriteCond %{QUERY_STRING} .*resource=acct:sam@samedwards\.ca.* [OR,NC]
RewriteCond %{QUERY_STRING} .*resource=acct%3Asam%40samedwards\.ca.* [OR,NC]
RewriteCond %{QUERY_STRING} .*resource=acct:sam@samedwards\.info.* [OR,NC]
RewriteCond %{QUERY_STRING} .*resource=acct%3Asam%40samedwards\.info.* [NC]
RewriteRule ^(.*)$ https://mastodon.social/.well-known/webfinger?resource=acct:samedwards@mastodon.social [R=307,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment