Thanks for the reply - this seems like a pretty nasty bug in mod_webapp doesn't it? Unless you're like Microsoft, then we could always just call it a "feature" :)
I'll try hacking at mod_webapp and see if I can get that to work (unless you could be so generous enough to pass on the code you're currently testing so I could take a look - if it's not "company confidential" or anything you can send it directly to me). Thanks for the help! - Brent -----Original Message----- From: James Williamson [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 10:27 AM To: Tomcat Users List Subject: Re: WebAppDeply and UseCanonicalNames Hi Brent, We had the same problem, if you actually look at the source code of mod_webapp (and you're familiar with Apache internals) you'll notice two things. 1) During Apache's rewrite handling stage which mod_webapp (wam_match) wants to take part in it returns OK, this tells Apache that the rewriting stage is over so mod_rewrite is essentially ignored. Since mod_webapp is generally the first handler (as you've often LoadModule(d) it) to take part in this stage this is the behaviour you'll get. 2) Even if you tell wam_match in mod_webapp to return DECLINED which lets mod_rewrite take part it doesn't make any difference. mod_webapp only looks at the raw uri, during the rewrite stage only the filename is alterered. What this basically means is with the current mod_webapp code you can forget all about rewriting. And then I'll start going on about the 302 issue..... The solution: hack mod_webapp or do something which we implemented, which is essentially moving over to using the filename, something we have on our development machine which we've been testing recently. Regards, James Williamson www.nameonthe.net ----- Original Message ----- From: Brent Johnson <[EMAIL PROTECTED]> To: Tomcat-User (E-mail) <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 3:09 PM Subject: WebAppDeply and UseCanonicalNames > Tomcat Version: 4.0.x (not sure which exact release - I think its > 4.0.2) > > I've got a pretty serious problem right now that I'm having trouble > fixing. I've got a production website running and I need to change the > header of the pages on the website depending on the hostname in the URL. > > I've got UseCanonicalNames set to off for the default, and for each > virtual host. Lets say I've got this... > <VirtualHost 192.168.1.20> > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /home/www/docs/development/blah.com > UseCanonicalName Off > ServerName doh.blah.com > ServerAlias homer homer.blah.com > > RewriteEngine on > RewriteRule ^.*\.xsl$ / [R] > > WebAppDeploy pctidev conn / > > ErrorLog logs/homer-error_log > CustomLog logs/homer-access_log common > <Directory "/home/www/docs/development/blah.com"> > Options All > AllowOverride All > Order allow,deny > Allow from all > </Directory> > </VirtualHost> > > I'm using Cocoon1 along with Tomcat (but I dont think it has anything to > do with Cocoon). If I try to go to the following URL with these > settings: > http://homer.blah.com/index.xml > > It works fine that way - BUT - if I try going to the following (keep in > mind I have index.xml set as one of my DirectoryIndex settings): > http://homer.blah.com/ > > It changes the URL to be http://doh.blah.com/index.xml > > If I comment out the WebAppDeploy in the VirtualHost and just stick in > an index.html file in the same directory and try the same thing it works > fine. It's almost as though Tomcat is the one doing the redirection > (and it doesnt make any difference if its a .xml file or .jsp - same > thing happens). I have both domains specified in my server.xml like the > following: > > <Host name="homer.blah.com" debug="0" appBase="webapps" > unpackWARs="true"> > <Valve className="org.apache.catalina.valves.AccessLogValve" > directory="logs" prefix="homer_access_log." > suffix=".txt" > pattern="common"/> > <Logger className="org.apache.catalina.logger.FileLogger" > directory="logs" prefix="homer_log." suffix=".txt" > timestamp="true"/> > <Context path="" docBase="/home/www/docs/development/blah.com" > debug="0" reload="true"/> > </Host> > > The exact same thing is copied after this and the name="" is changed to > name="doh.blah.com". > > Can ANYONE please give me a little help???? > > Thanks, > > - Brent > > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]> -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
