in reply to
CGI::Ajax Template::Toolkit mod_perl question.
CGI::Ajax does a lot of magic behind the scenes when you call build_html in order to make the AJAX bits work. The .../apache2 URL is likely to be coming from there - take a look at the page returned by your code and you should be able to find it in the HTML <head> in a chunk of javascript inserted by CGI::Ajax.
As far as how to prevent it... You pretty much can't, as far as I was ever able to figure out. You'll probably need to restructure your URI space so that the URLs generated by CGI::Ajax will work and be equivalent to the "normal" URLs that you use elsewhere. (This sort of thing is one of the main reasons I don't use CGI::Ajax any more... It's wonderfully easy to use for things that fit how it wants to do things, but you're pretty much screwed when you hit a case that it doesn't Just WorkTM for.)