Htaccess is a module which autogenerates a Drupal root htaccess file based on your settings.

Drupal tries to provide a one size fits all htaccess for Apache webservers, but this goal is increasingly difficult. This module allows the webmaster to set specific options.

Also, this module is dedicated to webmasters who don't want
to manually modify htaccess every time during a version
upgrade to use Drupal.

Features

  • Set redirection to www or non www.
  • Use Followsymlinks or SymlinksIfOwnersMatch.
  • HTTPS support (redirect all request to HTTPS or support both protocols).
  • Protect core text files (like CHANGELOG.txt) from being viewed.
  • Ability to insert Boost htaccess settings.
  • Add custom rules before Drupal rules.
  • Each htaccess is attached to a profile. This way, you can manage several htaccess files and deploy the right one to your website.
  • Check if htaccess is altered and report in site status
  • Drush integration.

All these features are available in the 7.x-2.x version. The 7.x-1.x version is for testing purpose only and should not be installed on a production website. There is no upgrade path.

Installation & usage

  1. Copy the entire htaccess directory into your Drupal site at sites/all/modules directory and enable the module in the "Administer" -> "Modules",
  2. On the settings page, set the options you want for your htaccess.
  3. On the generate page, set a name and a short description of what you htaccess do. Then click on generate. A htaccess profile will be created, based on the settings you set.
  4. The "deploy" page list all the htaccess profile you have created. You can view, delete, deploy or download the htaccess.

More informations are provided in the README file.

Project information

Releases