Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 10 Oct 2001 18:28:49 -0000 1.5 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 18 Oct 2001 21:49:45 -0000 1.6 @@ -1035,14 +1035,20 @@ return "" } # Other hostnames map to subsites. - db_1row node_id { + set found_node_id [db_0or1row node_id { select node_id from host_node_map where host = :host + }] + + if { $found_node_id == 1 } { + db_1row root_get { + select site_node.url(:node_id) as url + from dual + } + return [string range $url 0 [expr [string length $url]-2]] + } else { + # Hack to provide a useful default + return "" } - db_1row root_get { - select site_node.url(:node_id) as url - from dual - } - string range $url 0 [expr [string length $url]-2] }