I 've read that SSL handshaking takes place before rewrite rules in htaccess and I though to use something like
I've seen some people doing something similar Nginx: redirect non-www to www on https in nginx
and I thought if there is a way to do this in apache. Of course I tried the above code but I'm definitely no expert at this. Does anybody know how to do it?
Code:
NameVirtualHost se.rv.er.ip:443
<VirtualHost se.rv.er.ip:443>
ServerName www.mydomain.tld
Redirect permanent / https://mydomain.tld/
</VirtualHost>
and I thought if there is a way to do this in apache. Of course I tried the above code but I'm definitely no expert at this. Does anybody know how to do it?