Comments (3)
We're going to try doing this with patches in the drupal core makefile. But so far we've had trouble with local patches, so we're going to try to fix that as part of this as well...
from dkan-tools.
I've done this successfully with existing tools.
- First, make the changes you want to .htaccess, and use whatever your favorite process is to create a patch file. What I do is make the change (for this example I just added a single commented-out line, "TESTING .htaccess PATCH"), do
git diff --relative .htaccess > htaccess-patch.patch
, then revert the change (git checkout .htaccess
).
My resulting file looks like this:
diff --git a/.htaccess b/.htaccess
index 37fce10..37b6fdb 100644
--- a/.htaccess
+++ b/.htaccess
@@ -152,3 +152,5 @@ DirectoryIndex index.php index.html index.htm
# Disable content sniffing, since it's an attack vector.
Header always set X-Content-Type-Options nosniff
</IfModule>
+
+# TESTING .htaccess PATCH
\ No newline at end of file
-
Place your patch file in /src/patches/ (the actual path doesn't really matter as long as it's outside /docroot)
-
Add some lines like this to /src/make/drupal.make:
projects:
drupal:
patch:
1: ../src/patches/htaccess-patch.patch
- Next time you run
drupal:make
(soon to be replaced bymake:drupal
or justmake
) the patch should apply. Note that the patch file will also be copied into the project directory (docroot in the case of Drupal, the module folder if you're applying a local patch to a module), which is just some drush make weirdness we can't avoid.
from dkan-tools.
@dafeder Awesome, this looks great to me, hopefully @janette can confirm that it works.
from dkan-tools.
Related Issues (20)
- DKTL command classes cleanup HOT 1
- Combine get and init commands and make proxy connection more intuitive HOT 1
- Improve documentation structure HOT 1
- Document how to pass frontend options through the config.yml file
- Init should not override existing composer.json HOT 2
- Failed to drop or create the database HOT 1
- Command dkan:docs builds with broken sidebar
- Composer deprecated option "--dev"
- Document and complete project-specific test commands HOT 1
- Permissions on src/site/files gets locked down after file upload
- PHP Fatal error: require_once(): Failed opening required '/usr/local/dkan-tools/bin/../vendor/autoload.php' HOT 5
- Move images to PHP 7.4
- Add custom FQDN example HOT 2
- How to use demo site/data HOT 4
- Update php.ini within containers HOT 2
- Class 'DkanTools\Command\Util' not found while running project tests
- DKTL_MODE and DKTL_PROJECT_DIRECTORY broken HOT 1
- composer problem running dktl init when getting dependencies
- Update Images to PHP 8.1.x HOT 1
- Starting container process caused: exec: "dktl": executable file not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dkan-tools.