Mailing List Archive

Need some module programming advise (fwd)
---------- Forwarded message ----------
Date: Thu, 07 Sep 95 10:06:00 PDT
From: Bill Radcliffe <billr@corbis.com>
To: owner-new-httpd <owner-new-httpd@hyperreal.com>
Subject: Need some module programming advise


I am writing an Apache module and having some trouble getting things to work
the way I want. I have a working module, but it is not very clean.

The main purpose of the module is to intercept URLS that match a pattern and
convert them to other URLS. The twist is that I want the converted URLS to
be treated as if they had just been seen by the server. I want Alias and
ScriptAliases to be applied, etc, etc.

I seems like I should be able to make all of this happen during the
translate phase as long as my module is called first, but this is not the
case.

I have tried three schemes...
1) Convert and replace the original r->uri with my new r->uri and return OK
2) Convert and replace the original r->uri with my new r->uri and return
DECLINED
3) Convert the original r->uri to a r->filename and return OK in combination
with a handler that internally redirects the request in the handler.

I can not get either 1 or 2 to work no matter what I try, while 3 works like
a champ.
Obviously, I do not fully understand something. What am I missing?