I have configured Apache to load KnowledgeTree (KT) through a subdomain.
# Part of http.conf file NameVirtualHost *:80 <VirtualHost *:80> ServerName www.example.com ServerAlias example.com DocumentRoot /usr/local/apache2/htdocs </VirtualHost> <VirtualHost *:80> ServerName knowledgetree.example.com DocumentRoot /usr/local/apache2/htdocs/knowledgetree </VirtualHost>
When I enter
knowledgetree.example.com into the browser, I am supposed to see KT's login page.
Instead, I end up at
knowledgetree.example.com/knowledgetree/login.php and get the message:
The requested URL /knowledgetree/login.php was not found on this server.
In light of the URL where I end up, the error message is understandable because there is not another knowledgetree folder inside the htdocs/knowledgetree folder.
When I go to
example.com/knowledgetree, everything works as expected. The index.html file calls the control.php file in the same folder. If the control.php file sees that a login is necessary, it redirects to login.php (which is also in the same folder). Perfetct.
Unfortunately, control.php somehow prefixes 'login.php' with 'knowledgetree/' and spoils everything when knowledgetree.example.com is requested.
Is it possible to configure Apache to get around this or is it necessary to make a change in KT's source?