Force SSL on a WordPress

301 redirect
301 redirect

I’ve noticed that a .htaccess redirect works from the root folder down, but if you access the website from an old link you won’t be forced to HTTPS.

Updating the WP URL structure does not help

wordpress URL
WordPress URL

The Redirect

This will work to force the redirect:

If you are running WordPress in a sub folder, the following lines:

RewriteBase /blog/
RewriteRule . /blog/index.php [L]
Isaac Adams-Hands

Full Stack Developer, Digital Marketer, and InfoSec enthusiast. He received his Bachelor’s Degree from the University of Western Sydney and his Business Diploma from Georgian College before joining various marketing positions in search portals, e-commerce, higher education, and addiction recovery services.

Follow @ twitter

Related posts

Saving your Data

Spending some time at the cottage has led me to realize I can burn through 12GB of data really fast. Here are 6 ways to save data at the cottage, when traveling abroad, or on poor bandwidth connections: 1. Use Alternative Sources Ditch News & Magazine styled websites, alternatively, use Twitter to keep up-to-date 2…. Read More

Staying off mailing lists

Just saw an article I would like to read, but I noticed it was set up that you had to give all of your information to the business. Normally, I don’t mind, but this time I found how much I had to give away (personal information) wasn’t worth the skimming I’d most likely do when… Read More