Custom redirects and Drush/updates I usually update Core with Drush, because it's so easy and wonderful, but I have a custom htaccess and it always overwrites it, forcing me to rely on a checklist where I have to go and put my custom one back in. Is there a way I can either tell Drush not to overwrite it when updating or automatically put the custom one back in with a bash script or something? Or should I use a module to do these redirects instead? They are all like this and are a legacy from when our main company website hosted some custom apps:

RedirectMatch 301 ^/blah/ blah blah.cgi http://anotherwebsite.com/cgi-bin/blah.cgi
Short of support directly in Drush, this is what I would recommend.

Keep your site in a structure something like this:


srv
. www
. . mysite.com
. . . .git
. . . custom-htaccess
. . . custom-robots.txt
. . . htdocs
. . . . .htaccess
. . . . robots.txt
. . . . ... other files in the Drupal root


I like to structure my Drupal files as shown above so that I have a place to keep files in the same git repository as my Drupal files without exposing them to the webserver (or worrying about hiding them from the webserver with custom .htaccess rules).

If you keep all of your customizations to .htaccess and robots.txt in separate files like this, it would be an easy thing to concatenate them on the end of the corresponding Drupal core files.  This structure might be a good starting point for a formal Drush feature that does the same thing.

Update: If you are not on shared hosting, you'll do much better to store your .htaccess customization on the Apache vhost conf file, and leave Drupal's .htaccess file unmodified. The syntax of this file is about the same as the .htaccess file. The first step is to find the right file; it's often in /etc/apache2/vhost.d or /etc/httpd/vhost.d, although on Debian distros such as Ubuntu it is in /etc/apache2/sites-available. Apache configuration is not a Drupal-specific topic; there's a lot of info about it available on the Internet.