[opencms-dev] virtualhost example/tip sought

Christoph Kukulies kuku at physik.rwth-aachen.de
Thu Oct 27 16:57:53 CEST 2005


I have a www-server that resolves to www.company.de and an alias (CNAME)
that is www.company.com.

At present a javascript redirection in /index.html
acts like this

<html>
<head>
<script language="JavaScript">
<!--
function gotoPage()
{
    var dns1 = company.com"
    var dns2 = "company.de"
    var urlloc = location.href
    var loc = urlloc.toLowerCase()

    if (loc.indexOf(dns1) != -1)
        location.href="http://www.company.de/opencms/opencms/en/index.htm"

    if (loc.indexOf(dns2) != -1)
        location.href="http://www.company.de/opencms/opencms/de/index.htm"

}
//-->

</head>

<BODY onLoad="gotoPage()"> 
</body>
</html>

This doesn't seem very robot friendly in the sense that my site is traversed
nicely.

I want to replace this by some Virtualhost mechanism in Apache.
But I can't figure out how.
I tried with a ReWriteRule ^/.* /opencms/opencms/*

but this ends up in /opencms/opencms not found or something.
My DocumentRoot is e:/APache/Apache2/htdocs

and 

opencms is in

e:/Tomcat/tomcat4.1.24/webapps/opencms/export ...


I want to keep the DocumentRoot the same since the existing 
opencms (4.x) installation relies on it.

I'd greatly appreciate any advice.


--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de




More information about the opencms-dev mailing list