DEV Community

siddharth shukla
siddharth shukla

Posted on

WordPress redirect non-http to https

Add code within .htaccess


RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Read More: https://realprogrammer.in/wordpress-redirect-non-http-to-https/

Top comments (0)