pull down to refresh

My question is about redirection. For example, If I have a lightning address with a hosted provider like myusername@zbd.gg or myusername@coinos.io etc, how do i set up the file at mydomain.com/.well-known/lnurlp/myusername so that when people send to myusername@mydomain.com it will automatically redirect them to the hosted provider, e.g. myusername@zbd.gg? Is that something that can be done? Thank you!
You're going to self host your own server but not self host your own lightning? Why??
reply
Good question, this is for a community project. We want to offer our community their name@ourdomain.com lightning address & NIP-05 verification if they wish to represent @ourdomain. The idea would be that they could provide whatever lightning address they want to redirect it too.
reply
Proxy the request to the destination LN address?
Or try 301/302 redirect. No idea if the spec or clients support redirects.
reply
I've asked this to fiatjaf in the past and the response was that redirect is a cancer and it's not supported by spec. (Paraphrasing ) But some clients might follow the redirection.
reply
Good to know! I figure proxy is the way.
reply
Proxy the request to the destination LN address?
Thank you, that sounds like what I think I'm trying to do. Can you point me in the right direction for where I can learn more about this? Thank you.
reply
Depends on your application server. You might need to nginx proxy, or if it's a little more complex you might need a script to do the lookup.
301/302 redirects are quite standards web server behaviours, but you will have to do a lookup initially to know where to redirect to.
So some application coding might be needed.
reply
Simple: use your own LNbits server with Split and Scrub extensions https://github.com/lnbits/lnbits/wiki/LNbits-Extensions
reply