Andre,

        I think you shouldn't put the entire URI in the substitution rule, instead,
try the following:

RewriteRule Biocomputing/(.*) /cocoon/Biocomputing/$1 [PT]

        BTW, don't forget to pass every URI with /cocoon to Tomcat, in order to
avoid specifying port 8080.

Best regards,
 
---------------------------------------------
               Luca Morandini
               GIS Consultant
            [EMAIL PROTECTED]
          +39 0744 59  85  1 Office
          +39 0335 681 02 12 Mobile
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Andre Juffer [mailto:[EMAIL PROTECTED]]
> Sent: venerd́ 13 luglio 2001 22.23
> To: [EMAIL PROTECTED]
> Subject: Re: C1 to C2
>
>
> Luca,
>
> I have been playing with your suggestions. This is what I have added to
> httpd.conf as a test case:
>
>
> ----
> RewriteEngine On
> RewriteLog "/var/log/rewrite.log"
> RewriteLogLevel 3
> RewriteRule Biocomputing/(.*)
> http://ajuffer-dsl.oulu.fi:8080/cocoon/Biocomputing/$1 [PT]>
> ----
>
> (The last two lines is actually one line in the file.)
>
> After requesting http://ajuffer-dsl.oulu.fi/Biocomputing/users-database,
> the rewrite.log shows me this:
>
> ----
>
> 127.0.0.1 - - [13/Jul/2001:22:56:13 +0300]
> [ajuffer-dsl.oulu.fi/sid#80ad324][rid#80d15dc/initial] (2) init rewrite
> engine with requested uri /Biocomputing/users-database
> 127.0.0.1 - - [13/Jul/2001:22:56:13 +0300]
> [ajuffer-dsl.oulu.fi/sid#80ad324][rid#80d15dc/initial] (3) applying
> pattern 'Biocomputing/(.*)' to uri '/Biocomputing/users-database'
> 127.0.0.1 - - [13/Jul/2001:22:56:13 +0300]
> [ajuffer-dsl.oulu.fi/sid#80ad324][rid#80d15dc/initial] (2) rewrite
> /Biocomputing/users-database ->
> http://ajuffer-dsl.oulu.fi:8080/cocoon/Biocomputing/users-database
> 127.0.0.1 - - [13/Jul/2001:22:56:13 +0300]
> [ajuffer-dsl.oulu.fi/sid#80ad324][rid#80d15dc/initial] (2) implicitly
> forcing redirect (rc=302) with
> http://ajuffer-dsl.oulu.fi:8080/cocoon/Biocomputing/users-database
> 127.0.0.1 - - [13/Jul/2001:22:56:13 +0300]
> [ajuffer-dsl.oulu.fi/sid#80ad324][rid#80d15dc/initial] (2) forcing
> 'http://ajuffer-dsl.oulu.fi:8080/cocoon/Biocomputing/users-database' to
> get passed through to next API URI-to-filename handler
>
> ----
>
> (ajuffer-dsl.oulu.fi is the machine at home, behind firewall, and
> Biocomputing is an application we are working on, far from complete
> right now).
>
> It seems to me that the request
> http://ajuffer-dsl.oulu.fi/Biocomputing/users-database is correctly
> rewritten as
> http://ajuffer-dsl.oulu.fi:8080/cocoon/Biocomputing/users-database.
>
> Still, I get an error message:
>
>
> ----
>
> Found The document has moved here.
>
> Additionally, a 400 Bad Request error was encountered while trying to
> use an ErrorDocument to handle the request. Apache/1.3.12 Server at
> ajuffer-dsl.oulu.fi Port 80
>
> ----
>
> In fact, the apache error log file tells me:
>
> [Fri Jul 13 22:56:13 2001] [error] [client 127.0.0.1] Invalid URI in
> request GET /Biocomputing/users-database HTTP/1.1
>
> ----
>
> The request
> http://ajuffer-dsl.oulu.fi:8080/cocoon/Biocomputing/users-database
> directly to tomcat4
> itself works perfectly all right, so no problem there.
>
> So, within Apache the URL Rewriting works ok, but it seems to me that
> not a new http request is carried out ("resetting the location header"
> as one can do with Javascript), The request remains within Apache.
>
> Cheers,
> Andre.
>
>
>
>
> Luca Morandini wrote:
>
> >> -----Original Message-----
> >> From: Arnaud Vandyck [mailto:[EMAIL PROTECTED]]
> >> Sent: venerd́ 13 luglio 2001 14.53
> >> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> >> Subject: RE: C1 to C2
> >>
> >> If you only pass xml files to C2, you'll loose the ability to
> >> construct dynamic pdf with the pdf extension and so on with .txt or
> >> .sh or .jpg, and so on...
> >>
> >
> >     you may pass every URI you want to Cocoon, whathever the
> extension. Of
> > course, you will have to rely on the Apache rewrite engine to
> handle this
> > job (I mean: switching URI between Apache or Cocoon).
> >     This URI switching task might be pretty tricky and,
> moreover, is bound to
> > put application logic outside the sitemap... which is unfortunate.
> >
> >
> >> In your configuration, what will you do if you got to serve static xml
> >> files (example: applet configuration)?
> >>
> >
> >     I'll tell Apache NOT to pass xml files contained in a
> subsite to Cocoon.
> > For instance, every URI in www.foobar.com/foo/static won't be passed to
> > Cocoon but served directly by Apache, while every URI in
> >  www.foobar.com/foo/dynamic will be passed to Cocoon for
> further processing.
> >
> > Best regards,
> >
> > ---------------------------------------------
> >                Luca Morandini
> >                GIS Consultant
> >             [EMAIL PROTECTED]
> >           +39 0744 59  85  1 Office
> >           +39 0335 681 02 12 Mobile
> > http://utenti.tripod.it/lmorandini/index.html
> > ---------------------------------------------
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>
> --
> Andre H. Juffer              | Phone: +358-8-553 1683
> The Biocenter and            | Fax: +358-8-553-1141
>      the Dep. of Biochemistry | Email: [EMAIL PROTECTED]
> University of Oulu, Finland  | WWW:
> http://www.biochem.oulu.fi/research.html
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to