picosh / pico

hacker labs - open source and managed web services leveraging SSH
https://pico.sh
MIT License
741 stars 25 forks source link

feat(pgs): auto redirect www -> bare domain #88

Closed neurosnap closed 4 months ago

josephbu commented 4 months ago

I'm not sure that redirecting hard one way or the other is the right approach, each user may want different outcomes.

Personally for my sites I usually use the naked domain and redirect the www.

Having a feature that could be enabled by adding something to the _redirects file might be an option?

Currently for a site on pgs I worked around this by having 2 projects:

site setup for the naked domain and contains content. site-www setup for the www, contains _redirect with a 301 to the naked domain

This works well enough so far.

antoniomika commented 4 months ago

Thanks @josephbu! That was my argument as well. I'm gonna assume @neurosnap will add a way to define what the redirect should be like a bit more easily. I was of the opinion that if a user wants the functionality, they set it up as you have. But I think Eric wants to make it a bit more turnkey.

neurosnap commented 4 months ago

Alright, it sounds like we are okay with the compromise for now. I'm going to close this and write a section in our pgs docs for www redirects.