redbird
redbird copied to clipboard
how to redirect to www. ?
Hi,
I'm using redbird for a while and it is realy nice. One question is open. What is the common way to redirect users from domain.tld to www.domain.tld or from marketingname.tld to domain.tld/somewhat
I could register both routes to the same destination and make the redirects in the destination http server. But this isn't the good wiring. How do you solve this task at your projects?
I'm having the same issue, but looking at the code there is no way to do this atm.. :(
But it wouldn't be too hard to implement, in a way it would be a variation on the shouldRedirectToHttps function. A simple option like httpRedirect = true; as an option to the redbird.register would be great, this would then do a simple 302 redirect instead of proxy.
Or alternatively make it so the req / res could be intercepted like a middleware.
I could implement this, but would be much better if a maintainer could do this.
The req / res would be nice for some tasks.
For the redirect I think about a redbird.redirect(from, to, responsecode: 302)
+1 Would love to have this feature!
+1 waiting for this feature
+1 waiting for this feature