I have a WordPress website on a Bluehost shared hosting server and since I have multiple websites in my space, I have this particular folder in its own folder under public_html
. This means that I have a .htaccess
file in public_html
, which redirects my domain to the specific website folder. I also have another .htaccess
file in the website folder, which has some WordPress settings and a redirect for non-www URLs. I've tried adding this http -> https rule in both .htaccess
files, but it has no effect:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
</IfModule>
I'm also having related issues with menu links in WordPress. Even though my WP and site addresses contain https, my menu links are rendering with http. This happens if I use a custom link with just the anchor ID or full URL. Could anything in the .htaccess
file be interfering? Why would my http -> https rule be ignored?