0

We have an Apache web server that contains several Drupal 7 installations. Where should I place a .htaccess file in order for its contents to take effect on a particular website?

I tried putting it here /opt/apache/var/www/html/drupal-7.19/sites/thewebsitename but it didn't work.

  • What kind of things are you trying to do? There may be an alternate solution. – mpdonadio Sep 10 '13 at 18:09
3

If you have a multi-site Drupal installation (ie. folders other than 'all' and 'default' in your /opt/apache/var/www/html/drupal-7.19/sites/ directory), then you cannot have a separate .htaccess file for each site, and must place your changes in the common .htaccess which should already exist in /opt/apache/var/www/html/drupal-7.19/. Note that as these changes will apply to all of your multi-sites, you need to ensure your rules don't break sites you're not interested in.

If you have a more traditional installation of one site per one Drupal instance, then you'll still be modifying the same .htaccess file in /opt/apache/var/www/html/drupal-7.19/, but don't have to worry about breaking other sites.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.