Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netlify Redirects #337

Closed
miklb opened this issue Dec 7, 2022 · 11 comments
Closed

Netlify Redirects #337

miklb opened this issue Dec 7, 2022 · 11 comments

Comments

@miklb
Copy link
Contributor

miklb commented Dec 7, 2022

howdy! So glad to see your recent posts in the feed reader.

I'm trying to start fresh with a new indie domain and am using Eleventy on Netlify for the time being.

My current rewrites are

[[redirects]]
  from = "/.well-known/host-meta*"
  to = "https://fed.brid.gy/.well-known/host-meta.*"

[[redirects]]
  from = "/.well-known/webfinger*"
  to = "https://fed.brid.gy/.well-known/webfinger.*"

I'm putting the cart a bit before the horse in getting this configured before fully implementing mf2 and starting to post again, but I'm also using it as motivation.

It appears webfinger is working, but I still get the Next step: add the .well-known redirects message.

Any thoughts on what's amiss?

domain is michaelbishop.me

@miklb
Copy link
Contributor Author

miklb commented Dec 7, 2022

Just realized I was using meta* and not meta.* in the from redirect. Changing that now to see if that was the issue.

@snarfed
Copy link
Owner

snarfed commented Dec 7, 2022

Hey, welcome back! Thanks for trying Bridgy Fed!

Right now, it looks like eg https://michaelbishop.me/.well-known/webfinger?x=y redirects to https://www.michaelbishop.me/.well-known/webfinger?x=y (note the www), which then 404s.

@miklb
Copy link
Contributor Author

miklb commented Dec 7, 2022

OK, so now it's reporting

https://michaelbishop.me/.well-known/webfinger?resource=acct:michaelbishop.me@michaelbishop.me
  redirected to:
https://fed.brid.gy/.well-known/webfinger*?resource=acct:michaelbishop.me@michaelbishop.me
  returned HTTP 404

@miklb
Copy link
Contributor Author

miklb commented Dec 7, 2022

is it because I have the acct:michael@michaelbishop.me in the h-card?

@snarfed
Copy link
Owner

snarfed commented Dec 7, 2022

HTTP redirects are unrelated to what's in your h-card. Let me look again...

@snarfed
Copy link
Owner

snarfed commented Dec 7, 2022

Looks like that error message is right, your site is now redirecting to https://fed.brid.gy/.well-known/webfinger*?... with a literal * character at the end of the path. You'll want to remove that 😁

@aciccarello
Copy link

Here are the netlify redirects I am using for my site

[[redirects]]
  from = "/.well-known/host-meta*"
  to = "https://fed.brid.gy/.well-known/host-meta:splat"
  status = 302
[[redirects]]
  from = "/.well-known/webfinger*"
  to = "https://fed.brid.gy/.well-known/webfinger"
  status = 302

https://github.com/aciccarello/ciccarello.me/blob/de10157f08f35f7bdf70eefdf48eaec16687ca9c/netlify.toml#L55-L62

@miklb
Copy link
Contributor Author

miklb commented Dec 7, 2022

oh my. I assumed they would pick up the wildcard. Thank you.

@miklb
Copy link
Contributor Author

miklb commented Dec 7, 2022

@aciccarello's rules pass with flying colors for me. @snarfed I'll send a PR if you'd like to add this to the docs with a link to the Netlify Rewrites/Redirects page https://docs.netlify.com/routing/redirects/

I did one in the browser while I was here. Thanks again

miklb added a commit to miklb/bridgy-fed that referenced this issue Dec 7, 2022
@miklb miklb closed this as completed Dec 7, 2022
@snarfed
Copy link
Owner

snarfed commented Dec 7, 2022

@miklb the commit ^ looks great! Want to open a PR? You'll want to fix the indent of the first line inside the <pre>, otherwise I'll happily merge.

snarfed pushed a commit that referenced this issue Dec 7, 2022
@candidexmedia
Copy link

@aciccarello you're a life saver!

For the _redirects method, its:

/.well-known/webfinger*            https://fed.brid.gy/.well-known/webfinger          302
/.well-known/host-meta*             https://fed.brid.gy/.well-known/host-meta:splat           302

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants