Prevent your .htaccess from being overwritten during Drupal core updates.
Date Published: February 5, 2025
Issue
My .htaccess file and other core files are being overwritten during Drupal core updates.
Resolution
To prevent the .htaccess file from being overwritten when Drupal core is updated, you can add the following to the extra section in your composer.json:
- If you are using drupal/core-composer-scaffold add the following: