I am currently editing an existing site to enable https in it. The website has three requirements for redirect
urls with .html to .php
http to https
non-www to www
The code I am currently using is this
RewriteEngine on
RewriteRule ^(.*)\.html$ $1.php [L]
RewriteCond %{HTTP_HOST} ^websitename\.com$ [NC]
RewriteRule ^(.*)$ https://www.websitename.com/$1 [L,R=301]
But when I check www.websitename.com, it is not being redirected to https://www.websitename.com
I am trying many combinations for days (I have only basic knowledge of regexp), but it is showing one deficiency or another. Any help will be appreciated