I need for the url address in the client's browser to change to our main domain.  A 
redirect (ReWrite) is needed to do this.  The Apache ReWrite for JSP pages is not 
happening because of the connector sending *.jsp to Tomcat.

-----Original Message-----
From: George Sexton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 12:05 AM
To: 'Tomcat Users List'
Subject: RE: Virtual Host to Redirect


Why don't you just set the DNS so that all hosts resolve to the same
machine, and then set the default virtual host to have the files you
want in it?


George Sexton
MH Software, Inc.
Home of Connect Daily Web Calendar Software
http://www.mhsoftware.com/connectdaily.htm
Voice: 303 438 9585

-----Original Message-----
From: Boemio, Neil (GEI, FGI) [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 18, 2003 6:26 PM
To: Tomcat Users List
Subject: Virtual Host to Redirect


I have a sever with 2 IPs.  One of the IPs (say 1.2.3.4) is going to be
used as a redirector to point all our domains to one main domain.  
Example: Typing in
  another.name.com              will send the browser to my.main.com
  another.name.com/somepage.jsp will send the browser to my.main.com
  yetanother.name.com           will send the browser to my.main.com

This will be accomplished by having all our domains point to this one
redirector IP in our DNS.

I'm running Apache 2.0.47 and Tomcat 4.1.27 with JK2 as the connector.

So in my Apache conf I have:

<VirtualHost 1.2.3.4>
    RewriteEngine On
    RewriteRule /.* http://my.main.com/ [R]
</VirtualHost>

Now this works fine if I go to  http://1.2.3.4/.  It redirects to
my.main.com just fine.  My problem is that if I enter something like
http://1.2.3.4/somepage.jsp, then it does not get redirected.  Instead
Tomcat serves it up.  I believe this is happening because I have the
following in my workers2.properties file under the Apache conf
directory:

# Map JSPs to the Web server uri space
[uri:/*.jsp]
worker=ajp13:localhost:8009 

So it seems the connector is sending all JSPs to Tomcat and the Rewrite
in the VirtualHost is never getting to do it's job.  But of course, I
need JSPs to go to Tomcat.

Does anyone know how to get around this problem?  Or perhaps there is a
better way to accomplish what I'm trying to do?

Thanks a bunch!
Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to