Skip to content

Instantly share code, notes, and snippets.

@nk23x
Forked from grifferz/mastodon_well_known.conf
Created September 27, 2023 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nk23x/9fc17a27918493a65bf02fc1f31b5699 to your computer and use it in GitHub Desktop.
Save nk23x/9fc17a27918493a65bf02fc1f31b5699 to your computer and use it in GitHub Desktop.
Apache config snippet to redirect Mastodon webfinger
RewriteEngine On
RewriteCond %{QUERY_STRING} ^resource=acct:andy@ [NC]
RewriteRule /.well-known/webfinger https://social.bitfolk.com/.well-known/webfinger?resource=acct:grifferz@social.bitfolk.com [NC,L,R=301]
RewriteCond %{QUERY_STRING} ^resource=acct:grifferz@ [NC]
RewriteRule /.well-known/webfinger https://social.bitfolk.com/.well-known/webfinger?resource=acct:grifferz@social.bitfolk.com [NC,L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment