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

How to Verify SHA1 and SHA256 Checksum on Mac

It is incredibly easy to add a malicious components (malware) to DMG files,  uploading them to file sharing websites like sourceforge.net, & infecting computers on a mass scale.  SHA checksum is added to DMG files like TransmissionBT1, & Handbrake.fr2 to detect file tampering. How to check SHA checksums: In terminal, find the file(s) you’d like to… Read More

What is Disaster Recovery as a Service (DRaaS)?

With the continuous emergence of technologies in the social and mobile world, businesses have had no choice but to be more yielding and responsive in their daily activities. However, as much as these business entities have been evolving with evolving technologies, the risk of disaster striking is high. The notion behind this argument is based… Read More