VirtualHost { eh? That has been a bit of a problem I am having with Hiawatha: things that only apply to virtual hosts. I have no virtual hosts when building and testing on my desktop machine, localhost. My desktop setup is only aware of directories.
[link deleted because of stupid robot]
[link deleted because of stupid robot]
In order to test your suggestion, I will have to finish the whole thing without knowing if it works then upload the site and test it online. If something isn't right, I'll have to debug and fix remotely, which is a lot slower.
Another approach: can I call that rewrite function in the overall server setup? I mean, outside of any VirtualHost section? Apparently I can, but your code (used in the overall setup) makes ALL my pages return 404. I was suspicious of your regex and tried this instead:
UrlToolkit {
ToolkitID = show_index
RequestURI isfile Return
Match ^/(.*)/?$ Rewrite /$1/index-dir.cgi
}
Now it works a little. It works in the "domains" top level, i.e. it actually replaces the true index.cgi output, e.g.:
http://localhost/domain-1.net -> displays show_index output
http://localhost/domain-1.net/index.cgi -> displays the site's content as expected
http://localhost/domain-1.net/some_folder/ -> 404