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

Add Quick Keys in Safari (or any Program on your Mac)

I constantly test “disable Javascript” in my web design work. To make the process a lot faster, I added a quick key. Here is how I did it. System Preferences Go to System Preferences, Click on the Keyboard icon. Shortcuts In Shortcuts, go to the App Shortcuts tab, adding your desired shortcut by clicking on the “+” icon in… Read More