I am having difficulty defining a correct RewriteRule to forward requests to an application running in tomcat. I have apache with mod_rewrite enabled as well as tomcat setup with an application mounted with mod_jk. Without a virtual host, I can browse to the following url without issue. (context being the application running in tomcat)
http://www.domain.com/context
How do I configure the RewriteRule to pass requests from domain.com to the application running in tomcat.
http://www.domain.com --> http://www.domain.com/context
Here is what my current virtual host file looks like
<VirtualHost *:80>
ServerName www.domain.com
<Directory />
Options FollowSymLinks
AllowOverride None
RewriteEngine On
RewriteRule \/$ /context [L]
</Directory>
<Directory /var/www/html/context/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
This will pass the request from domain.com
to a directory named context
in /var/www/html
. How do I override the default apache setup to pass the request to the application running in tomcat?
Thanks in advance for your help.