Jump to content

WordPress force HTTPS and change all HTTP links to HTTPS?


kavoir.com

Recommended Posts

I just installed SSL on one of my sites. While it's working well on the main site, it's not on the wordpress blog here. I have added this snippet in .htaccess of the blog:
 

RewriteCond %{HTTPS} !=on

RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

But it's still not fully secure with some assets not in secure mode. I used Httpfox to check all the HTTP requests and all HTTP requests are correctly redirected to HTTPS. Now I don't know why it's still not fully secure. I thought redirecting all HTTP assets to HTTPS would be the deal in this case? Is it?

If not, it seems the only option left for me is to manually change all HTTP assets (href, src, etc.) to HTTPS across all the content. Is there any easy way to achieve this for the entire WP blog? A plugin? This doesn't seem right to me as I'm afraid it would neglect one asset or two on some of the posts or pages.

This really sucks.....any help would be appreciated!

 

Login to your WordPress dashboard and navigate to Settings > General.
Ensure that the WordPress Address (URL) and Site Address (URL) are https. If not, add s after http to make https and save it.

  • 2 weeks later...

If that doesn't work create a .htaccess file

 

RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php


RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yoursite.com/$1 [R,L]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.