Tom Jackson wrote:
Actually ns_rewriteurl only redirects under the set pageroot, so you can't use it for this purpose.
Ah, I see, Ns_ConnRedirect it must be. I looked into the source and it goes very deep just by URL, before expanding it to a path, so not very useful indeed.

What you can do is to write a simple filter which rewrites the url to some other place under pageroot which is blocked from direct access. You could,
Sound like that would be harder (config wise) for the users, not optimal.

Hmmm, I think I just hit the jackpot, Ns_UrlToFileProc in the NsServer->fastpath struct. There even is an example on how to use it: http://www.aolserver.com/docs/devel/c/c-examples.html (example 2: "Alias")

Looks like that does what I want it to do. That makes it even simpler than I thought it would be, I was afraid I might have to do a lot of this stuff manually. (ie: Ns_ConnReturnFile and the like)

Loading C level modules using the AOLserver api will likely need to be done at the correct time, before tcl modules are sourced, so I don't see how to jump ahead and read a tcl configuration file to load an AOLserver C module. However, if it is just a Tcl .so module, you can do this easily right now.
Reading http://www.aolserver.com/docs/devel/c/api/c-ch393.htm, it sounds like any of your own C modules load before nsd starts sourcing the Tcl libraries (modules/tcl), so you should be able to tell it to go look somewhere else for them too. I'll keep looking. One down, one to go.

Cheers,
Bas.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to