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

HTML sitemap w/o a WP Plugin

Have you heard about HTML sitemap? Well, it offers easy navigation for your website visitors. To be more precise, it’s the bulleted outline text version of a website. The visitors can use the sitemap to easily find/locate any topic which they can’t find searching through the whole website menus. The best part is that HTML… Read More

How-to: Buy Expired Domains

Here is a quick video on how-to-buy expired domains with high domain-rank. A prerequisite for this tutorial is that you’ll need access to Ahrefs & a copy of Scrapebox. I would also recommend buying some proxies for your Scrapes. TL;DW Login to Ahrefs >> go to More >> Ahrefs Rank >> Select a domain Go… Read More