I currently have my rewrite rules in the post_virtualhost_2.conf file this in inserted into the httpd.conf file at the absolute end.
I have two blocks that don't seem to be working
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{SERVER_ADDR} !=127.0.0.1
RewriteCond %{SERVER_ADDR} !=::1
RewriteRule ^ %{ENV:PROTO}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
The full conf is here
What I am expecting is the following in all cases
But when I enter privatmamtora.com it simply get a 200 response.
PS. I am hoping that the rules could be subdomain safe. (Not break subdomains)
EDIT
Rewrite module is loaded.