Is there a way to add custom directives through ISPC to apache that appear only in the non-/ssl vhosts?
Untested, but you could probably just put the same directive in both and use <If> to run the right one. Code: <If "%{HTTPS} == 'on'"> ssl stuff..... </If> <Else> non-ssl stuff.... </Else> https://httpd.apache.org/docs/current/expr.html
Ok, this works: Code: <If "%{HTTPS} == 'off'"> Redirect permanent / https://sub.domain.tld/ </If> I think I have to adjust my le2ispc script since it's recommended to use Redirect permanent This means rewrite conditions aren't needed anymore hence less trouble with different rewrites
Hmmm, I tried to get it running and I used it now like: Code: <If "%{HTTPS} == 'off'"> Redirect permanent / https://%{HTTP_HOST} </If> since the old Code: RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] also worked fine. I ended now up with a vhost file like this: https://paste.simplylinux.ch/view/71c2c03c which looks all fine. However if I do call that domain in the browser, I don't end up at https://domain.tld but at https://%{http_host}
Dunno, I'm not familiar enough with where % expands work and don't. That clearly says old URL-path is %-decoded, but doesn't as clearly say that the new URL isn't %-decoded, though that could certainly be inferred. Your results would seem to confirm that.