Forum

Apache AddHandler equivalent

Duke
19 March 2012, 15:12

Hiawatha version: 8.1
Operating System: Linux Ubuntu

I want to emulate the following Apache directives:

AddHandler encapsulated-file-type .some_extension
Action encapsulated-file-type /cgi-bin/encapsulator.cgi

That is: whenever the server is asked for an .ht file, it hands it off to "encapsulator.cgi"

Is this possible using Hiawatha? TIA
--
Duke
Duke
20 March 2012, 15:22
The line should have read:

That is: whenever the server is asked for an .some_extension file, it hands it off to "encapsulator.cgi"
Hugo Leisink
22 March 2012, 17:52
I'm on holiday right now. I get back to you on saturday.
Duke
24 March 2012, 00:31
No worries!! have fun! Stay out of trouble ....
Hugo Leisink
24 March 2012, 21:20
You can do so via the UrlToolkit:
UrlToolkit {
ToolkitID = redirect
Match .*\.some_extension Rewrite /encapsulator.cgi
}

VirtualHost {
...
UseToolkit = redirect
}
Duke
24 March 2012, 21:37
I had a suspicion that UrlToolkit might be the answer
Basically what I want to do is emulate SSI to "sandwich" a "contents" file between a pre-defined header and footer - without having any hooks in the "contents" file.

So page1.some extension will get merged with header & footer via encapsulator.cgi. I'm going off to try to make it work! Thanks!
This topic has been closed.