Ryan, Eduardo,
I agree, openacs-core things break in host-node mapped sites. Many times, it's because a package is limited to a single mount, often outside of the host node mapped file hierarchy. These should be re-worked to handle more general cases.
I guess what I'm saying is that the rp_handler is not the place to be throwing form posts. Use it to generate urls that work in the first place.
Most apps reside within a single directory. By omitting all forward slashes, browsers use existing directories. The case is simple for all these host node map directories.. no change required. For example, take a look at birdswelcome.com All the forms in that site use post. All are in a single directory. No issues, even when accessing via dekkasupply.com/birdswelcome
For apps that require processing between a hostnode-mapped domain and the main-domain, such as login and register, build the post and return_url ahead of time using absolute references.
site_node::conn_url is helpful. It is especially useful in a place like index.vuh in a hostnode-mapped directory.
Here's an example from universallogos.com/index.vuh
set conn_url [site_node::conn_url]
set conn_url0 [ad_conn url]
ns_log Notice "/www/universallogos/index.vuh conn_url = '${conn_url}', ad_conn url = ${conn_url0}"
if { $conn_url eq "" } {
regsub -- {/universallogos/} $conn_url0 {/} conn_url
}
if { [string match "/resources/*" $conn_url ] } {
set redirect_url "/www${conn_url}"
rp_internal_redirect $redirect_url
ad_script_abort
} elseif { [string match "/search/*" $conn_url ] } {
set query [ns_conn query]
set redirect_url "http://dekkasupply.com${conn_url}?${query}"
ns_log Notice "/usr/local/www/dekkasupply.com.com/openacs-4/www/universallogos/index.vuh: redirecting to: ${redirect_url}"
ad_returnredirect -allow_complete_url $redirect_url
ad_script_abort
} else {
::xowiki::Package initialize -ad_doc {
The script uses an XoWiki page as root page
of the site. Here, the start page is /xowiki/ followed
by the actual URL, as specified as the value after "-url" below.
Replace this value, in case a different XoWiki instance
name should be used.
@author Gustaf Neumann (gustaf.neumann@wu-wien.ac.at)
@creation-date July, 2006
@cvs-id $Id: index.vuh,v 1.5 2006/09/15 16:45:00 gustafn Exp $
} -parameter {
{-m view}
{-folder_id:integer 0}
} -url /universallogos/xowiki${conn_url}
::$package_id reply_to_user [::$package_id invoke -method $m]
ad_script_abort
}
cheers,
Torben