Last updated October 28, 2014. Created on May 28, 2014.
Edited by TheodorosPloumis, hiawatha. Log in to edit this page.

Hiawatha Webserver offers URL rewriting via the URL Toolkit. The required toolkit rule for your Drupal website is:

UrlToolkit {
    ToolkitID = drupal
    RequestURI isfile Return
    Match ^/favicon.ico$ Return
    Match /(.*)\?(.*) Rewrite /index.php?q=$1&$2
    Match /(.*) Rewrite /index.php?q=$1
}

VirtualHost {
    Hostname = www.yoursite.org
    WebsiteRoot = /path/to/drupal
    ...
    UseToolkit = drupal
}

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

tkcent’s picture

Since Hiawatha does not parse .htaccess files, you will need to add lines to the UrlToolkit or Directory directives to emulate their functionality.

Specifically, the .htaccess files to check are:

Main File
/.htaccess - Block access to certain extensions and rewrite url.

Public Files (wherever that may be)
/sites/default/files/.htaccess - Turn off PHP execution

Private Files (wherever that may be)
/sites/default/files/private/.htaccess - Deny Access

Here is my initial attempt at a corresponding UrlToolkit:

UrlToolkit {
    ToolkitID = Drupal
    Match /sites/default/files/private DenyAccess
    Match /sites/default/files/(.*)\.php DenyAccess
    Match \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$ DenyAccess
    RequestURI isfile Return
    Match ^/favicon.ico$ Return
    Match /(.*)\?(.*) Rewrite /index.php?q=$1&$2
    Match /(.*) Rewrite /index.php?q=$1
}

Other functionality such a gzip compression, Error 404 handling, and setting Expires headers have not been addressed.

Hiawatha also has some nice features such as EnforceFirstHostname and RequireTLS which will handle redirects for the www prefix and enforce HTTPS respectively.