Closed Kaperskyguru closed 3 years ago
This is not possible currently with this module since it is using req.url
.
I suggest you to directly handle this with a serverMiddleware.
Wow.
Do you have a way or example showing how to handle this with serverMiddleware
?
We are using connect for serverMiddleware. You can take a look at https://mindthecode.com/blog/how-to-redirect-www-traffic-to-non-www-in-your-express-app/ but remember that res.redirect
is only for Express, to do redirect in Connect (pure node.js http): https://stackoverflow.com/questions/22141137/response-redirect-in-connect
Cool, But I was able to solve it with CloudFlare. I will check this out also.
Thanks for your help.
Yes, CloudFlare is the best for this since it happens on the edge :fire:
Hello there,
Please how can I solve this problem with Nuxt-redirect
"Use 301 redirects to drive traffic to URLS with the same domain and sub domain (www and non-www subdomain)."
Move like redirecting
www
tonon-www
Thanks