Forum OpenACS Q&A: Host-Node Map Usage

Collapse
Posted by Jay Dubanik on
What is the usage of Registered hostname/URL pairs table on
Host-Node-Map admin page?
Is this for admin information only or is it used somewhere?
Collapse
Posted by Gilbert Wong on
You can use the host-node-map to map domains to your subsites.  The mapped domains use the same tablespace and the TCL library as the main site.
Collapse
Posted by Don Baccus on
For a real-life example, visit http://greenpeace.nl.  You'll see that you're redirected to http://greenpeace.org/nederland_nl.  This is handled via the site node map.
Collapse
Posted by Gilbert Wong on
Don,

If you mount acs-subsite on a URL/directory, can't it also handle the domain without the redirect to the main site?  That's how I've setup one of my subsites.  I made a host-node-map on a URL with acs-subsite mounted on it and when I visit the subdomain.mydomain.com, it does not do a redirect to the main site.

Collapse
Posted by Alex Sokoloff on
You can also use host-node map without the re-direct, right? In other words, you could transparently (or opaquely, depending on how you look at it) map requests for greenpeace.nl/ to www.greenpeace/nederland_nl/ without redirecting to the subsite url. That seemed to me to be the design intent of the host-node map. The last time I played with it, openacs would forget about your login state from the main site because cookies are accessed according to the root url. Was that why you chose to redirect?
Collapse
Posted by Alex Sokoloff on
Hey, that's no fair! Gilbert's post wasn't there when I wrote my now-redundant post. We must have been typing the same thing at the same time!
Collapse
Posted by Don Baccus on
We redirected because of language/national organization subsite tracking issues, all done by our custom version of rp_filter.  We could've worked around this given more time but time was something we didn't have much of.

And in addition we're using the host-node map to "deep link" into the site, as GP traditionally offers domain names for various issues.  In our case this mean mapping to a node within the site along with a query string - and there's no easy way to append the query string to the structure built by AOLserver that's then returned by ns_form (I looked :)

Redirecting solves that problem ... now we can map any domain to any arbitrary page + query string in the site.

So given that we couldn't cheaply avoid redirection in all cases and had little time to even fiddle with the simpler case, we just punted and redirected in all cases.