Enforce https via .htaccess, file integrity check error

I added the following code to the .htaccess file

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

The setting runs smoothly and the .htaccess file has not beeing updated since I changed it.