Forum

dynamic URL rewriting via .hiawatha possible?

Felix Riesterer
15 August 2010, 22:00
Hi,

In my web projects I make rather frequent use of Apache's .htaccess file in which I define URL rewriting rules (among other things).

Please confirm:
1.) It is not possible to define new rewriting rules in a ".hiawatha" file.
2.) It is however possible to apply rewriting rules to a directory using a UrlToolkit.
2.a) The UrlToolkit must be defined in the central hiawatha.conf config file.
2.b) The UrlToolkit's rewriting rules can be applied by the toolkit's ToolkitID.

So I guess it is not possible to simply define a .hiawatha file in any subdirectory of a website and configure "local" rewriting rules as would the possible with Apache's .htaccess files. Am I right?

Thank you for any clarification on this issue.

Hiawatha version: 6.16
Operating System: puppy linux "lucid puppy 5.01"
Hugo Leisink
15 August 2010, 22:23
1: correct. It is not possible to define rewrite rules in a .hiawatha file. The reason is that it's quite expensive to 'compile' a rewrite rule. So, I want this to be done only once and therefor made it available only in the hiawatha.conf file (parsed at startup).
2: correct. Just use the right path in a Match parameter.
2.a: correct.
2.b: I don't think I understand the question completely, but the ToolkitID can be used to call the toolkit rules.
Felix Riesterer
15 August 2010, 23:40
Thank you Hugo for clarifying things.

I so loved Apache's feature to allow rewrite rules in independant .htaccess files in any subdirectory of a website so a webmaster can use them to design his/her web project without the need to change any main configuration files and any restarting of the webserver itself. Seems like Hiawatha isn't my first choice because of this.

But I'll keep watching this project...

Again thank you and keep up the good work on Hiawatha!

Regards,

Felix Riesterer.
This topic has been closed.