toolkit per directory using .hiawatha files

7 July 2014, 07:04

Hiawatha version: 9.6
Operating System:Centos 6

The ONLY reason I am still using apache and hiawatha in a reverse proxy are the .htaccess rewrite rules, in a shared hosting environment this is ideal. Clients can change .htaccess and if they mess up in only creates a server error for that directory.

If hiawatha could allow custom url rewriting using the .hiawatha files we could lose the bloated apache forever!

Please consider this, it would end any reason to use apache.
Hugo Leisink
7 July 2014, 09:05
That would require some serious rewrite in how Hiawatha reads configuration files. How about I see if it's possible to only make the UseToolkit option available in .hiawatha files? In most cases, users don't need a custom rewrite rule. They use Wordpress, Drupal, Joomla, etc, which all require a standard rewrite rule. A shared hosting provider has them already loaded via the main configuration and a user can use one by specifying it via the .hiawatha file. Ok for you?
7 July 2014, 12:10
Sounds good to me, that would make things easier.
13 July 2014, 04:37
I got all our production servers ready to remove apache, url tool kits setup for all major cms, and am anxiously awaiting some news considering this feature.
Hugo Leisink
13 July 2014, 10:27
I'm still thinking about how to implement this. The issue here is that an URL rewrite could result in that a different directory will be selected. The directory part of the URL defines where Hiawatha will look for a .hiawatha file. So, Hiawatha needs the URL rewrite to know what .hiawatha file to read, but needs a .hiawatha file to know what UrlToolkit rule to execute. This is kind of a chicken-egg problem. I'm still thinking about a clean way to solve this.
13 July 2014, 19:02
Since this option is really only for the ease of allowing clients to add a set of defined rewrite rules (joomla, wordpress, etc) we can make this much simplier than 'per directory', and really make it 'per host'... meaning, allow the .hiawatha file in the root of the website set the url toolkits to use. This would allow a client to use 'joomla' or wordpress preset rewrites without a host changing configuration of the actual webserver.

Make it easier?
Hugo Leisink
13 July 2014, 22:19
That was exactly what I was thinking about. I'll try to implement it this way.
15 July 2014, 20:13

Regarding Hiawatha + Wordpress, is it possible to have wordpress run multiple sites with hiawatha ? It seems to work well for other webservers. Though i follow procedure it seems hiawatha is not working well with the multi-site wordpress, no sites menu pops up.

Thanks for your feedback,

Hugo Leisink
15 July 2014, 20:42
I don't know Wordpress that well. What is required for a multi-site wordpress installation?

By the way, the UseToolkit setting in a .hiawatha file at the root of a user directory seems to be working well in 9.7 beta.
17 July 2014, 05:35
Great news! Will be awaiting final release! Hope you also make the change to the cgi-wrapper to allow all files if nothing after the pipe
18 July 2014, 08:58

Was just thinking, our control panel uses urltoolkit to redirect to webmail, control panel, etc... when using the .hiawatha urltoolkit option, are you just appending it to the already definef toolkits to use?
Hugo Leisink
18 July 2014, 09:51
No, it will replace any existing calls to UrlToolkit rules. When I do an append, I can already see the next questions coming. You want append, another wants replace, another ones prepend. Just tell your users to start with certain rewrite rules and then append their own when using it in a .hiawatha file.
18 July 2014, 10:32
Very true!
This topic has been closed.