.htaccess file kept changing back to without https forwarding

I setup my .htaccess file to do the https fowarding and it is working perfectly. But I start noting after a while the forwarding code will disapper. What can be the reason causing it? Will it be because of adding new plugins? Thanks!

Here is what I have for https forwarding in my .htaccess file.

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  RewriteBase /

# Rewrite HTTP to HTTPS
  RewriteCond %{HTTPS} !=on
  RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
</IfModule>

this is without it enter image description here



Read more here: https://stackoverflow.com/questions/66343543/htaccess-file-kept-changing-back-to-without-https-forwarding

Content Attribution

This content was originally published by PpppppPppppp at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: