# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
The above .htaccess code does not redirect to HTTPS. Why?
(the IfModule are commented out on purpose to show I haven't missed the rewrite module)
update
When trying it out with http://htaccess.madewithlove.be I received
RewriteCond %{HTTPS} =on This condition was not met
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301] This rule was not met because one of the conditions was not met
RewriteCond %{REQUEST_FILENAME} !-f This variable is not supported: %{REQUEST_FILENAME}
RewriteCond %{REQUEST_FILENAME} !-d This variable is not supported: %{REQUEST_FILENAME}
My htaccess fu is weak at best so I cannot wrap my head around how
RewriteEngine On
becomes
RewriteCond %{HTTPS} =o
which gets commented
This condition was not met
or that
RewriteCond %{REQUEST_FILENAME} !-d
gets comment
This variable is not supported: %{REQUEST_FILENAME}
Maybe I am tired. Maybe I am just stupid.
TIA