Our production setup is more complex, but this is the essence of it. This works fine, but the automatic redirection sends a 301 redirect which we’d like a little more control over. Specifically:
There aren’t any directives that modify the redirection behaviour of Automatic HTTPS. You should be able to split up your site into two vhosts for fine-grained control of the redirection process, though. It would look something like this: