I have a modified .htaccess where I added a RewriteCond.
Now I get on every page load:
There were problems with the code integrity check. More information…
What is the right solution to prevent this error message? And of course, I don't want to use the original .htaccess.
I might have found a solution in the documentation, although core developpers say this shouldn't be done: https://doc.owncloud.org/server/9.0/admin_manual/issues/code_signing.html#errors
You could modify $OWNCLOUDHOME/core/signature.json file in order to update your .htaccess signature.
This should make owncloud think it has the right .htaccess file.
In order to do that:
1) run ./occ integrity:check-core
This will give you the expected signature and the actual signature for your core files.
2) edit core/signature.json and replace, on the .htaccess entry, the provided signature with your htaccess signature (given in step 1).
If, later, you need to file a bug report, owncloud developpers might ask you to restore the original .htaccess file and the original signature.json file, so make a backup. This feature is intended to mildly improve security and facilitate the developpers work.
Hope this will help you !
Edit Owncloud 9.1:
I've updated my own owncloud instance, and though I really do not recommand you to do that (use it at your own risks), you can disable code check in the config.php file.
Just add 'integrity.check.disabled' => true,