Secure, non-secure, www, non-www redirects

I’m being told on one of our sites that it’s a problem there’s too many redirects from > >

The one in the middle ideally would be cut out. What part of Trellis is managing these redirects so that it could be fixed?

Thanks for bringing this up. Perhaps this line should be changed (untested):

-   return 301 $scheme://{{ host.canonical }}$request_uri;
+   return 301 {{ ssl_enabled | ternary('https', 'http') }}://{{ host.canonical }}$request_uri;
1 Like

@Simeon: An improvement proposed in roots/trellis#889

1 Like

Cool. I was going to give it a try next week.

…I meant in three weeks. Totally works @fullyint, thank you!