Forum Moderators: phranque
www.example.com/home/*. www.example.com/datamart/* then I want to avoid passing the request to Tomcat and use the document root established for this new application.
NameVirtualHost *:80
<VirtualHost *>
ServerName www.orcastech.com
rewriteengine on
rewritelog logs/rewrite.log
rewriteloglevel 1
RewriteRule !^/datamart - [C]
RewriteRule !^/emba48wiki - [C]
## If /home context already requested then do nothing
RewriteRule !^/home - [C]
RewriteRule ^/(.*) http://www.orcastech.com/home/$1 [L]
SetEnvIf Request_URI \.php no-jk
SetEnvIf Request_URI \.cgi no-jk
# Use SetEnvIf to st no-jk when /datamart/ is encountered
SetEnvIf Request_URI "/datamart/*" no-jk
JkMount /home* worker1
DocumentRoot "c:\Apache\apache-tomcat-6.0.29\webapps\home"
</VirtualHost>
<VirtualHost *>
ServerPath /datamart/
DocumentRoot "C:\vhosts\datamart\htdocs"
CustomLog logs/system.datamart.access.log combined
ErrorLog logs/system.datamart.com-error.log
</VirtualHost>
NameVirtualHost *:80
#
<VirtualHost *>
#
ServerName www.orcastech.com
ServerAlias orcastech.com
#
DocumentRoot "c:\vhosts\datamart\htdocs"
CustomLog logs/system.datamart.access.log combined
ErrorLog logs/system.datamart.com-error.log
#
SetEnvIf Request_URI "\.(php|cgi)$" no-jk
# Use SetEnvIf to st no-jk when /datamart/ is encountered
SetEnvIf Request_URI "^/datamart" no-jk
#
RewriteEngine on
RewriteLog logs/rewrite.log
RewriteLoglevel 1
#
RewriteCond $1 !^(datamart|emba48wiki|home)
RewriteRule ^/(.*)$ http://www.orcastech.com/home/$1 [R=301,L]
#
JkMount /home worker1
Alias /home "c:\Apache\apache-tomcat-6.0.29\webapps\home"
#
</VirtualHost>
http://www.example.com/home/vhosts/datamart/app/webroot/htdocs/datamart
http://www.orcastech.com/home/vhosts/datamart/app/webroot/htdocs/datamart