In a message dated 12/8/2001 1:17:17 AM Eastern Standard Time, [EMAIL PROTECTED] writes:
> In nsd/return.c we have modified the function > Ns_ConnReturnRedirect. Please note the additional block of > code marked with a "ZZZ BNA" comment. What this does is > return the user specified host name in preference to the > Location value. This solves our particular problem. It is > not a Virtual Hosting solution per se, but it does solve our > problem. > > Hello, The use of Host header makes sense to me and it's what we use for several sites here at AOL - perhaps it should just be the default in 4.0? As for the code changes, turns out there's an (undocumented) API in nsd/conn.c to set your own function to return the location. In 3.x (not sure when it arrived) it's: Ns_SetLocationProc(Ns_LocationProc *proc) and in 4.0 it's: Ns_SetLocationProc(char *server, Ns_LocationProc *proc) Note that because it was never documented I changed it to be (oddly) virtual server safe in the 2.x sense. An Ns_LocationProc is just a function which takes an Ns_Conn and returns a char *. Hope that helps, -Jim
