Home Wordpress site htaccess not redirecting to https when manually entering URL starting with http
Reply: 0

Wordpress site htaccess not redirecting to https when manually entering URL starting with http

user1100
1#
user1100 Published in June 24, 2018, 11:54 pm

I've made changes to my htaccess file on my WordPress site to redirect traffic from http to https.

Most cases it works fine and redirects traffic to https, but some cases it doesn't.

For example, if I try access home page with http in address it redirects to https, but if I try and access another page on the site with http in URL it stays on http:

  • http: //example.com redirects fine to https: //example.com
  • http: //example.com/page stays on http: //example.com/page

Current htaccess:

# BEGIN WordPress
<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
</IfModule>
# END WordPress

I've tried numerous answers in other question, what else can I try?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.31506 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO