---
title: "Drupal 9 Patch htaccess with Composer"
url: "https://michalak.world/posts/drupal-9-patch-htaccess-with-composer/"
description: "Drupal 9 Patch htaccess with Composer"
summary: "Drupal 9 Patch htaccess with Composer.\""
date: 2023-09-21
lastmod: 2026-08-19
tags: ["Drupal","Drupal 10","Drupal 9","Drupal 8","Composer","Configuration"]
section: "posts"
author: "Michael Michalak"
site: "https://michalak.world/"
---

# Drupal 9 Patch htaccess with Composer

Drupal 9 Patch htaccess with Composer

In composer.json add to the scripts section. See below:
```
"scripts": {
    "pre-install-cmd": [],
    ...
    "post-drupal-scaffold-cmd": [
        "patch -p1 < patches/my-htaccess.patch"
    ]
},
```

