I have a WordPress install on a subdomain: https://blog.example.com
To enforce SSL I have the following redirects in my .htaccess
:
<IfModule mod_rewrite.c>
RewriteEngine On
# BEGIN FORCE HTTPS
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301]
# END FORCE HTTPS
# BEGIN WordPress
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
</IfModule>
This used to work until a while ago. Now, when calling http://blog.example.com
, I get:
Moved Permanently
The document has moved here.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
The word "here" in line 2 links to http://blog.example.com
.
What's wrong with the .htaccess
?
I checked the WordPress settings and they are not the problem: The site URL is correctly set to https://blog.example.com
.