It seems like .htaccess doesn't redirect my pages from http to https. My domain is redirected to https but not my pages… Can it be a bad configuration from my web host?
Here is what I have done until now:
- Choose a SSL certificate and installed it on my website from the host.
- Force wp-config to pass from HTTP to HTTPs with: define('FORCE_SSL_ADMIN', true);
- Tranform all of my URLs to HTTPs with Replace and Search DB
- Add this domain to Google Search Console…
Put this code in my .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect to HTTPS
RewriteCond %{HTTP_HOST} ^http://example\.com [NC]
RewriteCond %{SERVER_PORT} ^80$ [OR]
RewriteCond %{HTTPS} =off [OR]
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]
# Redirect from www HTTPS to HTTPS
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I think that's all… Would you have an idea of what can cause this problem?