Last active
December 30, 2015 12:19
-
-
Save blazindrop/7828026 to your computer and use it in GitHub Desktop.
Drush command to resave your .htaccess files for upgrade to 7.24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### CD into top level sites directory; change owner writable so drush can write new file | |
### find -maxdepth 3 -name .htaccess -printf "%p %M\n" -exec chmod u+w '{}' \; | |
# public directory | |
drush @sites eval 'file_create_htaccess(variable_get("file_public_path"),FALSE,TRUE);' | |
# private directory | |
drush @sites eval 'file_create_htaccess(variable_get("file_private_path"),TRUE,TRUE);' | |
# temp directory (some platforms only need to run this on one site for shared temp directories) | |
drush @sites eval 'file_create_htaccess(variable_get("file_temporary_path"),FALSE,TRUE);' | |
### change permissions back | |
### find -maxdepth 3 -name .htaccess -printf "%p %M\n" -exec chmod u-w '{}' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment