Correct, it sounds like you do need a modified httpd. After recognizing "/magic" and before doing the execl(), it would use the supplied Host: header line to select a new namespace.