Skip to main content
  1. Posts/

Drupal 9 Patch htaccess with Composer

·22 words·1 min·
Drupal Drupal 10 Drupal 9 Drupal 8 Composer Configuration

In composer.json add to the scripts section. See below:

"scripts": {
    "pre-install-cmd": [],
    ...
    "post-drupal-scaffold-cmd": [
        "patch -p1 < patches/my-htaccess.patch"
    ]
},
Michael Michalak
Author
Michael Michalak
Experienced Drupal consultant and Fractional CTO with over 13 years of expertise in backend development, optimization, and securing Drupal applications, specializing in custom module development, migrations, and enterprise integrations across various industries.