On Thu, 27 Mar 2003, Ayan George wrote:
> I'm trying to register a procedure to handle:
>
> http://www.foo.net/~user/
>
> type URLs. I want to redirect the request to:
>
> http://members.foo.net/user/
>
> I tried a couple of registerd procedures like:
>
> ns_register_proc -noinherit GET {/~*} tilde_redirect
> ns_register_proc -noinherit POST {/~*} tilde_redirect
>
> But the expression doesn't seem to match
> anything. I'm sure there is something very
> simple I'm overlooking.
>
> Does anyone have any suggestions?
I suspect that using -noinherit options don't mix very well with
wildcard *. I belive that there is no simple solution other that
ns_register_proc GET {/~*} tilde_redirect
but it does more than you probably want.
Maybe you should look at ns_register_dir module from Zjednoczenie.com
AOLserver 3.x distro from http://miniacs.zjednoczenie.com/download/nsdz6.tgz
It is based on example from older AOLserver docs which can be found here:
http://www.tcl.tk/man/aolserver3.0/c-app2.htm.
It supports general url -> directory mapping but also mappings /~user to
user home directory.
Module ns_register_dir, after enhancements, was finally renamed to
ns_url2file which I've described in my proposal sent to the list a few
weeks ago. It could be reached at:
http://miniacs.zjednoczenie.com/download/vserv2.tgz
--tkosiak
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/