John, Thanks for the threads. I will certainly read them.
I can't imagine why Tomcat wouldn't support this behavior unless there is another issue in Tomcat that this is covering up ... I mean this is basic http server stuff, I thought. All the same...thanks! :) Neal -----Original Message----- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:51 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat See Tim Moore's reply to your post earlier today: http://marc.theaimsgroup.com/?l=tomcat-user&m=104206237029628&w=2 The discussion on the tomcat-dev list is here: http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/msg38868.html My point was that as you can see in the tomcat-dev discussion, Remy says "I will -1 this patch unless the behavior is made optional" which means there is a reason that Tomcat does the 302 and he feels strongly enough about it to register a negative vote for changing that behavior. You might want to research why that is before you decide to change it, as changing that behavior might affect something else that is more important to you than search engine placement. In any case, you can apply the patch yourself, but to do that, you will need to build Tomcat (or at least the affected parts) from source. Or wait until the next release. My guess is you will have to move up to 4.1.18 to apply the patch, though I don't have a good feel for the differences in the different versions. John -----Original Message----- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 6:45 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat John, You say there is a patch for Tomcat that will fix this redirect thing ... or at least allow me to configure it to not redirect like this? Great! Do you know specifically which patch this is? Is there any documentation that you know of regarding the patches ability to tweak this behavior? BTW - I'm currently using Tomcat 4.0.4. I wouldn't by chance already have this ability would I? I didn't see anything in the docs. Thanks. Neal -----Original Message----- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:25 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Many people do not run Tomcat on port 80. Some do. Those who don't, run Apache on port 80 and use a connector to pass requests to Tomcat. "Tomcat Stand-alone" means Tomcat running on port 80, or some other port with the port number appended to the request. That is, no Apache "in the mix". The suggestion to use RewriteRule only works if you use mod_rewrite, which is an Apache module. This means that Tomcat no longer listens on port 80, but on another port such as 8009, and communicates with Apache via that port. Apache listens on port 80, and in the case of the proposed solution, mod_rewrite would process the URL prior to the Tomcat connector (mod_jk or mod_jk2) getting it, which would avoid the 302 from Tomcat you are concerned about, since Tomcat would see it as a normal request, not a request that needed to be redirected or forwarded to the default welcome page. RewriteRule cannot be used in Tomcat by itself. Not in server.xml, not in web.xml. It is a mod_rewrite directive, and mod_rewrite is an Apache module. If you want to use RewriteRule and mod_rewrite, install Apache, setup mod_rewrite, setup a connector, disable the CoyoteConnector on port 80 (and 8080 if it is still enabled) in server.xml, make sure there is a CoyoteConnector listening on port 8009 (or some other port for JK/JK2) in Tomcat's server.xml, and call it good. If you do not want to use Apache in any way shape or form, then wait for or apply the patch pointed out by Tim earlier in the thread. Judging from what I read in that thread, there are very good reasons for the 302, though I didn't pursue the thread far enough back to get an idea of exactly what they are. In any case, with the patch, the existing behavior (302) is the default, and you will have to specifically configure Tomcat to behave differently. John -----Original Message----- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 5:47 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat It sounds like you are saying that you must also run Apache ... that Tomcat alone is not sufficient. Is this correct? And that I would setup mod_rewrite within Apache before it gets to Tomcat? Wouldn't this then mean that you're not actually using Apache as a Standalone? Are you connecting to Tomcat via WARP? I'm confused. :( -----Original Message----- From: Gary Gwin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 2:35 PM To: Tomcat Users List Subject: Re: RewriteRules and Standalone Tomcat Yes, but your requests must be passed through Apache to Tomcat-Standalone via mod_jk. We do this on our site and it works nicely. The URL requests are processed by mod_rewrite before mod_jk forwards them to Tomcat, so the Apache behavior you desired is achieved. I don't think that "Tomcat-Standalone" means what it looks like it should mean, if you know what I mean ;-) Gary neal wrote: >Oh, does that mean it *is* possible to use RewriteRules with Tomcat >Standalone then? :-\ > >Neal > > >-----Original Message----- >From: Turner, John [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, January 08, 2003 1:04 PM >To: 'Tomcat Users List' >Subject: RE: RewriteRules and Standalone Tomcat > > > >Yes, specific to a Tomcat issue, but the solution incorporates Apache. >:) > >John > > > > >>-----Original Message----- >>From: neal [mailto:[EMAIL PROTECTED]] >>Sent: Wednesday, January 08, 2003 3:54 PM >>To: Tomcat Users List >>Subject: RE: RewriteRules and Standalone Tomcat >> >> >>Oh. :( >> >>But this was actually a solution offered specific to a Tomcat issue: >> >>Issue: Unlike Apache, tomcat automatically redirects to the welcome >>page, rather than forwarding. In other words, to present the welcome >>page tomcat will literally redirect (http 302) to >>www.xyz.com/index.html, rather than >>staying at www.xyz.com. I do not want this effect as I am >>affraid it will >>have negative effects on my search engine placement. >> >>I was given the advice to use a RewriteRule to fix this problem. >> >>If this is not the solution, does anyone know what the solution is? I >>was told this is actually a "feature" of tomcat ... I call it a PAIN >>IN THE ASS, and a serious oversight for standalone Tomcat. >> >>Anyone know a solution? >> >>Thanks. >>Neal >> >> >>-----Original Message----- >>From: Turner, John [mailto:[EMAIL PROTECTED]] >>Sent: Wednesday, January 08, 2003 7:16 AM >>To: 'Tomcat Users List' >>Subject: RE: RewriteRules and Standalone Tomcat >> >> >> >>Beat me with a stick if I'm wrong, but RewriteRule is for Apache when >>using mod_rewrite, I don't think you can use it in server.xml or >>web.xml. >> >>John >> >> >> >> >>>-----Original Message----- >>>From: neal [mailto:[EMAIL PROTECTED]] >>>Sent: Wednesday, January 08, 2003 4:51 AM >>>To: Tomcat Users List >>>Subject: RewriteRules and Standalone Tomcat >>> >>> >>>What exaclty is a RewriteRule and how is it used with Standalone >>>Tomcat? Do I define my RewriteRules somewhere in server.xml or >>>web.xml? >>> >>>A couple of months ago, Noel told me how I could get Tomcat to show >>>the content of the default welcome page without redirecting (http >>>302) to the >>>file, using a RewriteRule. I took notes from that email and set it >>>aside only to realize when I returned ... that I have no idea what >>>to do with this >>>info! And of course no info is available (that I could find) >>>online or in >>>the Tomcat manual explaining this. :( >>> >>>Could someone please explain how this RewriteRule would be integrated >>>into >>>Tomcat: >>> >>> RewriteRule ^/$ /index.html [L] >>> >>>Thanks! >>>Neal >>> >>> >>>-- >>>To unsubscribe, e-mail: >>><mailto:[EMAIL PROTECTED]> >>>For additional commands, e-mail: >>><mailto:[EMAIL PROTECTED]> >>> >>>--- >>>Incoming mail is certified Virus Free. >>>Checked by AVG anti-virus system (http://www.grisoft.com). >>>Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 >>> >>> >>> >>> >>-- >>To unsubscribe, e-mail: >><mailto:[EMAIL PROTECTED]> >>For additional commands, e-mail: >><mailto:[EMAIL PROTECTED]> >> >> >>-- >>To unsubscribe, e-mail: >> >> ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > >-- >To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- Gary Gwin http://www.cafesoft.com ***************************************************************** * * * The Cafesoft Access Management System, Cams, is security * * software that provides single sign-on authentication and * * centralized access control for Apache, Tomcat, and custom * * resources. * * * ***************************************************************** -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>