tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Collins, Jason)
Subject RE: URL Rewriting in Apache to forward to Tomcat
Date Fri, 07 Apr 2000 19:12:50 GMT

To summarize:

I essentially want to use mod_rewrite to forward all requests in Apache to a servlet. I can't
get this to work. A
posting in the Tomcat FAQ says that this is possible, but doesn't go into any details as to
how to achieve it.

Any specifics would be appreciated.


-----Original Message-----
From: Collins, Jason []
Sent: April 7, 2000 10.55a
Subject: URL Rewriting in Apache to forward to Tomcat

This is a bit of a cross between Apache and Tomcat, so if I'm in the wrong place, I apologize...

I want to send all requests except for 1 directory to Tomcat, using Apache to serve that other

I have tomcat mounted at /p2 in Apache:

  ApJServMount /p2 /root

I am using URL rewriting to rewrite requests to go to that /p2 mount:

	RewriteEngine On
	RewriteRule ^(.+)$ /p2/$1

(This rewrites everything, I know, but I am just simplifying for this example.)

The rewrite.log file shows an internal redirect

  rewrite util/snoop.html -> /p2/util/snoop.html
  internal redirect with /p2/util/snoop.html [INTERNAL REDIRECT]

and the request is going through to Tomcat. However, it doesn't seem to get picked up by my
default context:

        <Context path="" docBase="c:/phoenix/www/" debug="0" reloadable="true"

That is, the page is not handled by my default servlet.

What am I doing wrong? Is there a better way to do this?

Jason Collins                            Phone 306.955.1855
Information Systems Manager                Fax 306.955.0471
Point2 Internet Systems            

To unsubscribe, email:
For additional commmands, email:

View raw message