You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Liam Morley <lm...@lovecraft.gdc.wpi.edu> on 2002/04/04 20:54:38 UTC
working with mod_rewrite
I read up on working with mod_rewrite in the Cocoon FAQ, and I'm having a
bit of a hard time getting mod_rewrite to cooperate with my sessions.
I've got the following in my Apache httpd.conf:
RewriteEngine On
RewriteLog "E:/rewrite.log"
RewriteLogLevel 3
RewriteRule /cms/(.*) /cocoon/cms/$1 [PT]
Each time the page is visited, a new session ID is created. After checking
the logs, I noticed that the JSESSIONID isn't getting passed when using
mod_rewrite. Here's an excerpt from the log without using mod_rewrite:
PARAM: 'cookie' VALUES: '[JSESSIONID=A897E11152D430961782D5C9D9E67211;
CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
PARAM: 'connection' VALUES: '[Keep-Alive]'
PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
PARAM: 'referer' VALUES: '[http://localhost/cocoon/cms/info/mission.html]'
PARAM: 'accept' VALUES: '[image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, */*]'
PARAM: 'accept-language' VALUES: '[en-us]'
PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.1; Q312461)]'
PARAM: 'host' VALUES: '[localhost]'
And here's what happens when I use mod_rewrite:
PARAM: 'cookie' VALUES:
'[CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
PARAM: 'connection' VALUES: '[Keep-Alive]'
PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
PARAM: 'referer' VALUES: '[http://localhost/cms/news/news_story_1.html]'
PARAM: 'accept' VALUES: '[*/*]'
PARAM: 'accept-language' VALUES: '[en-us]'
PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.1; Q312461)]'
PARAM: 'host' VALUES: '[localhost]'
As you can tell, there's no JSESSIONID when I use mod_rewrite.. also, the
'accept' parameter is different.
If anybody can help me, I'd greatly appreciate it. Thanks:)
Liam Morley
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: rdf from Slashdot and Freshmeat
Posted by Michael Wechner <co...@wyona.org>.
Roman, thanks a lot for your help.
It works by using an invented namespace "n-rdf" (as you suggested):
<xsl:stylesheet
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#
xmlns:n-rdf="http://my.netscape.com/rdf/simple/0.9/">
All the best
Michael
KOZLOV Roman wrote:
> Hi Michael,
>
> Try to put the rdf namespace declaration in stylesheet tag like this:
> <xsl:stylesheet . . . xmlns:rdf="http://my.netscape.com/rdf/simple/0.9/">
>
> and then in your xsl templates refer to elements from this namespace with rdf: prefix:
> <xsl:template match="rdf:some_element">
>
> PS: Of course, you can declare it with another prefix.
>
> Hope it helps.
>
> Best regards
> Roman
>
> Michael Wechner wrote:
>
>
>>Hi
>>
>>I would like to use the rdf from Slashdot and Freshmeat via XInclude.
>>http://www.slashdot.org/slashdot.rdf
>>http://www.freshmeat.net/backend/fm.rdf
>>
>>Everything works fine except that the following declaration
>>
>>xmlns="http://my.netscape.com/rdf/simple/0.9/"
>>
>>within these document makes a lot of trouble. First of all
>>the XSLT transformer just doesn't seem to match anything if the
>>declaration is present. When I remove it, everything works fine.
>>The other thing is when the bracket > is on a new line then the
>>XML Serialzer seems to remove the declaration. When the bracket >
>>is on the same line, then it will stay there.
>>
>>Pretty strange everything.
>>
>>Did anybody xinclude this stuff before?
>>
>>Thanks
>>
>>Michael
>>
>>Michael Wechner wrote:
>>
>>
>>>For us mod_proxy seems to work quite alright so far, except for
>>>the following problems:
>>>1) Referer which are used for later redirection (held within session)
>>>2) Absolute URL's within pages
>>>3) Absolute Path to images
>>>
>>>We are currently resolving these problems by setting on the Cocoon side
>>>some rules how these URL's have to be "rewritten" in case the
>>>publication is viewed via proxy. But it's not very elegant (Although
>>>other applications such as for instance Zope seem to have the same
>>>problem).
>>>
>>>Maybe we just need some more experience:-)
>>>
>>>Michael
>>>
>>>giacomo wrote:
>>>
>>>
>>>>On Thu, 4 Apr 2002, Michael Wechner wrote:
>>>>
>>>>
>>>>
>>>>>Did you try mod_proxy?
>>>>>
>>>>>You will find some notes at
>>>>>
>>>>>http://www.wyona.org/docs/wyona-cms-docs/integrator-guide/virtual-server/proxy-apache.html
>>>>>
>>>>>
>>>>>
>>>>We had some issues with ProxyPass (I don't remember right now what it
>>>>was) and used both like this:
>>>>
>>>>RewriteRule ^/cocoon/(.*)$ http://cocoonhost:8080/cocoon/$1 [P,L]
>>>>ProxyPassReverse /cocoon/ http://cocoonhost:8080/cocoon/
>>>>
>>>>Giacomo
>>>>
>>>>
>>>>
>>>>>All the best
>>>>>
>>>>>Michael
>>>>>
>>>>>
>>>>>
>>>>>Liam Morley wrote:
>>>>>
>>>>>
>>>>>
>>>>>>I read up on working with mod_rewrite in the Cocoon FAQ, and I'm
>>>>>>having a
>>>>>>bit of a hard time getting mod_rewrite to cooperate with my sessions.
>>>>>>
>>>>>>I've got the following in my Apache httpd.conf:
>>>>>>
>>>>>>RewriteEngine On
>>>>>>RewriteLog "E:/rewrite.log"
>>>>>>RewriteLogLevel 3
>>>>>>RewriteRule /cms/(.*) /cocoon/cms/$1 [PT]
>>>>>>
>>>>>>
>>>>>>Each time the page is visited, a new session ID is created. After
>>>>>>checking
>>>>>>the logs, I noticed that the JSESSIONID isn't getting passed when using
>>>>>>mod_rewrite. Here's an excerpt from the log without using mod_rewrite:
>>>>>>
>>>>>>PARAM: 'cookie' VALUES: '[JSESSIONID=A897E11152D430961782D5C9D9E67211;
>>>>>>CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
>>>>>>PARAM: 'connection' VALUES: '[Keep-Alive]'
>>>>>>PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
>>>>>>PARAM: 'referer' VALUES:
>>>>>>'[http://localhost/cocoon/cms/info/mission.html]'
>>>>>>PARAM: 'accept' VALUES: '[image/gif, image/x-xbitmap, image/jpeg,
>>>>>>image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
>>>>>>application/msword, */*]'
>>>>>>PARAM: 'accept-language' VALUES: '[en-us]'
>>>>>>PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0;
>>>>>>Windows
>>>>>>NT 5.1; Q312461)]'
>>>>>>PARAM: 'host' VALUES: '[localhost]'
>>>>>>
>>>>>>And here's what happens when I use mod_rewrite:
>>>>>>PARAM: 'cookie' VALUES:
>>>>>>'[CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
>>>>>>PARAM: 'connection' VALUES: '[Keep-Alive]'
>>>>>>PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
>>>>>>PARAM: 'referer' VALUES:
>>>>>>'[http://localhost/cms/news/news_story_1.html]'
>>>>>>PARAM: 'accept' VALUES: '[*/*]'
>>>>>>PARAM: 'accept-language' VALUES: '[en-us]'
>>>>>>PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0;
>>>>>>Windows
>>>>>>NT 5.1; Q312461)]'
>>>>>>PARAM: 'host' VALUES: '[localhost]'
>>>>>>
>>>>>>As you can tell, there's no JSESSIONID when I use mod_rewrite..
>>>>>>also, the
>>>>>>'accept' parameter is different.
>>>>>>
>>>>>>If anybody can help me, I'd greatly appreciate it. Thanks:)
>>>>>>
>>>>>>Liam Morley
>>>>>>
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>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: <co...@xml.apache.org>
>>>>>>For additional commands, e-mail: <co...@xml.apache.org>
>>>>>>
>>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>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: <co...@xml.apache.org>
>>>>>For additional commands, e-mail: <co...@xml.apache.org>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>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: <co...@xml.apache.org>
>>>>For additional commands, e-mail: <co...@xml.apache.org>
>>>>
>>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>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: <co...@xml.apache.org>
>>>For additional commands, e-mail: <co...@xml.apache.org>
>>>
>>>
>>---------------------------------------------------------------------
>>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: <co...@xml.apache.org>
>>For additional commands, e-mail: <co...@xml.apache.org>
>>
>
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: rdf from Slashdot and Freshmeat
Posted by KOZLOV Roman <r-...@opencascade.com>.
Hi Michael,
Try to put the rdf namespace declaration in stylesheet tag like this:
<xsl:stylesheet . . . xmlns:rdf="http://my.netscape.com/rdf/simple/0.9/">
and then in your xsl templates refer to elements from this namespace with rdf: prefix:
<xsl:template match="rdf:some_element">
PS: Of course, you can declare it with another prefix.
Hope it helps.
Best regards
Roman
Michael Wechner wrote:
> Hi
>
> I would like to use the rdf from Slashdot and Freshmeat via XInclude.
> http://www.slashdot.org/slashdot.rdf
> http://www.freshmeat.net/backend/fm.rdf
>
> Everything works fine except that the following declaration
>
> xmlns="http://my.netscape.com/rdf/simple/0.9/"
>
> within these document makes a lot of trouble. First of all
> the XSLT transformer just doesn't seem to match anything if the
> declaration is present. When I remove it, everything works fine.
> The other thing is when the bracket > is on a new line then the
> XML Serialzer seems to remove the declaration. When the bracket >
> is on the same line, then it will stay there.
>
> Pretty strange everything.
>
> Did anybody xinclude this stuff before?
>
> Thanks
>
> Michael
>
> Michael Wechner wrote:
>
> > For us mod_proxy seems to work quite alright so far, except for
> > the following problems:
> > 1) Referer which are used for later redirection (held within session)
> > 2) Absolute URL's within pages
> > 3) Absolute Path to images
> >
> > We are currently resolving these problems by setting on the Cocoon side
> > some rules how these URL's have to be "rewritten" in case the
> > publication is viewed via proxy. But it's not very elegant (Although
> > other applications such as for instance Zope seem to have the same
> > problem).
> >
> > Maybe we just need some more experience:-)
> >
> > Michael
> >
> > giacomo wrote:
> >
> >> On Thu, 4 Apr 2002, Michael Wechner wrote:
> >>
> >>
> >>> Did you try mod_proxy?
> >>>
> >>> You will find some notes at
> >>>
> >>> http://www.wyona.org/docs/wyona-cms-docs/integrator-guide/virtual-server/proxy-apache.html
> >>>
> >>>
> >>
> >> We had some issues with ProxyPass (I don't remember right now what it
> >> was) and used both like this:
> >>
> >> RewriteRule ^/cocoon/(.*)$ http://cocoonhost:8080/cocoon/$1 [P,L]
> >> ProxyPassReverse /cocoon/ http://cocoonhost:8080/cocoon/
> >>
> >> Giacomo
> >>
> >>
> >>> All the best
> >>>
> >>> Michael
> >>>
> >>>
> >>>
> >>> Liam Morley wrote:
> >>>
> >>>
> >>>> I read up on working with mod_rewrite in the Cocoon FAQ, and I'm
> >>>> having a
> >>>> bit of a hard time getting mod_rewrite to cooperate with my sessions.
> >>>>
> >>>> I've got the following in my Apache httpd.conf:
> >>>>
> >>>> RewriteEngine On
> >>>> RewriteLog "E:/rewrite.log"
> >>>> RewriteLogLevel 3
> >>>> RewriteRule /cms/(.*) /cocoon/cms/$1 [PT]
> >>>>
> >>>>
> >>>> Each time the page is visited, a new session ID is created. After
> >>>> checking
> >>>> the logs, I noticed that the JSESSIONID isn't getting passed when using
> >>>> mod_rewrite. Here's an excerpt from the log without using mod_rewrite:
> >>>>
> >>>> PARAM: 'cookie' VALUES: '[JSESSIONID=A897E11152D430961782D5C9D9E67211;
> >>>> CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
> >>>> PARAM: 'connection' VALUES: '[Keep-Alive]'
> >>>> PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
> >>>> PARAM: 'referer' VALUES:
> >>>> '[http://localhost/cocoon/cms/info/mission.html]'
> >>>> PARAM: 'accept' VALUES: '[image/gif, image/x-xbitmap, image/jpeg,
> >>>> image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
> >>>> application/msword, */*]'
> >>>> PARAM: 'accept-language' VALUES: '[en-us]'
> >>>> PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0;
> >>>> Windows
> >>>> NT 5.1; Q312461)]'
> >>>> PARAM: 'host' VALUES: '[localhost]'
> >>>>
> >>>> And here's what happens when I use mod_rewrite:
> >>>> PARAM: 'cookie' VALUES:
> >>>> '[CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
> >>>> PARAM: 'connection' VALUES: '[Keep-Alive]'
> >>>> PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
> >>>> PARAM: 'referer' VALUES:
> >>>> '[http://localhost/cms/news/news_story_1.html]'
> >>>> PARAM: 'accept' VALUES: '[*/*]'
> >>>> PARAM: 'accept-language' VALUES: '[en-us]'
> >>>> PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0;
> >>>> Windows
> >>>> NT 5.1; Q312461)]'
> >>>> PARAM: 'host' VALUES: '[localhost]'
> >>>>
> >>>> As you can tell, there's no JSESSIONID when I use mod_rewrite..
> >>>> also, the
> >>>> 'accept' parameter is different.
> >>>>
> >>>> If anybody can help me, I'd greatly appreciate it. Thanks:)
> >>>>
> >>>> Liam Morley
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> 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: <co...@xml.apache.org>
> >>>> For additional commands, e-mail: <co...@xml.apache.org>
> >>>>
> >>>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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: <co...@xml.apache.org>
> >>> For additional commands, e-mail: <co...@xml.apache.org>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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: <co...@xml.apache.org>
> >> For additional commands, e-mail: <co...@xml.apache.org>
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
rdf from Slashdot and Freshmeat
Posted by Michael Wechner <co...@wyona.org>.
Hi
I would like to use the rdf from Slashdot and Freshmeat via XInclude.
http://www.slashdot.org/slashdot.rdf
http://www.freshmeat.net/backend/fm.rdf
Everything works fine except that the following declaration
xmlns="http://my.netscape.com/rdf/simple/0.9/"
within these document makes a lot of trouble. First of all
the XSLT transformer just doesn't seem to match anything if the
declaration is present. When I remove it, everything works fine.
The other thing is when the bracket > is on a new line then the
XML Serialzer seems to remove the declaration. When the bracket >
is on the same line, then it will stay there.
Pretty strange everything.
Did anybody xinclude this stuff before?
Thanks
Michael
Michael Wechner wrote:
> For us mod_proxy seems to work quite alright so far, except for
> the following problems:
> 1) Referer which are used for later redirection (held within session)
> 2) Absolute URL's within pages
> 3) Absolute Path to images
>
> We are currently resolving these problems by setting on the Cocoon side
> some rules how these URL's have to be "rewritten" in case the
> publication is viewed via proxy. But it's not very elegant (Although
> other applications such as for instance Zope seem to have the same
> problem).
>
> Maybe we just need some more experience:-)
>
> Michael
>
> giacomo wrote:
>
>> On Thu, 4 Apr 2002, Michael Wechner wrote:
>>
>>
>>> Did you try mod_proxy?
>>>
>>> You will find some notes at
>>>
>>> http://www.wyona.org/docs/wyona-cms-docs/integrator-guide/virtual-server/proxy-apache.html
>>>
>>>
>>
>> We had some issues with ProxyPass (I don't remember right now what it
>> was) and used both like this:
>>
>> RewriteRule ^/cocoon/(.*)$ http://cocoonhost:8080/cocoon/$1 [P,L]
>> ProxyPassReverse /cocoon/ http://cocoonhost:8080/cocoon/
>>
>> Giacomo
>>
>>
>>> All the best
>>>
>>> Michael
>>>
>>>
>>>
>>> Liam Morley wrote:
>>>
>>>
>>>> I read up on working with mod_rewrite in the Cocoon FAQ, and I'm
>>>> having a
>>>> bit of a hard time getting mod_rewrite to cooperate with my sessions.
>>>>
>>>> I've got the following in my Apache httpd.conf:
>>>>
>>>> RewriteEngine On
>>>> RewriteLog "E:/rewrite.log"
>>>> RewriteLogLevel 3
>>>> RewriteRule /cms/(.*) /cocoon/cms/$1 [PT]
>>>>
>>>>
>>>> Each time the page is visited, a new session ID is created. After
>>>> checking
>>>> the logs, I noticed that the JSESSIONID isn't getting passed when using
>>>> mod_rewrite. Here's an excerpt from the log without using mod_rewrite:
>>>>
>>>> PARAM: 'cookie' VALUES: '[JSESSIONID=A897E11152D430961782D5C9D9E67211;
>>>> CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
>>>> PARAM: 'connection' VALUES: '[Keep-Alive]'
>>>> PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
>>>> PARAM: 'referer' VALUES:
>>>> '[http://localhost/cocoon/cms/info/mission.html]'
>>>> PARAM: 'accept' VALUES: '[image/gif, image/x-xbitmap, image/jpeg,
>>>> image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
>>>> application/msword, */*]'
>>>> PARAM: 'accept-language' VALUES: '[en-us]'
>>>> PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0;
>>>> Windows
>>>> NT 5.1; Q312461)]'
>>>> PARAM: 'host' VALUES: '[localhost]'
>>>>
>>>> And here's what happens when I use mod_rewrite:
>>>> PARAM: 'cookie' VALUES:
>>>> '[CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
>>>> PARAM: 'connection' VALUES: '[Keep-Alive]'
>>>> PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
>>>> PARAM: 'referer' VALUES:
>>>> '[http://localhost/cms/news/news_story_1.html]'
>>>> PARAM: 'accept' VALUES: '[*/*]'
>>>> PARAM: 'accept-language' VALUES: '[en-us]'
>>>> PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0;
>>>> Windows
>>>> NT 5.1; Q312461)]'
>>>> PARAM: 'host' VALUES: '[localhost]'
>>>>
>>>> As you can tell, there's no JSESSIONID when I use mod_rewrite..
>>>> also, the
>>>> 'accept' parameter is different.
>>>>
>>>> If anybody can help me, I'd greatly appreciate it. Thanks:)
>>>>
>>>> Liam Morley
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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: <co...@xml.apache.org>
>>>> For additional commands, e-mail: <co...@xml.apache.org>
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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: <co...@xml.apache.org>
>>> For additional commands, e-mail: <co...@xml.apache.org>
>>>
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: <co...@xml.apache.org>
>> For additional commands, e-mail: <co...@xml.apache.org>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: working with mod_rewrite
Posted by Michael Wechner <co...@wyona.org>.
For us mod_proxy seems to work quite alright so far, except for
the following problems:
1) Referer which are used for later redirection (held within session)
2) Absolute URL's within pages
3) Absolute Path to images
We are currently resolving these problems by setting on the Cocoon side
some rules how these URL's have to be "rewritten" in case the
publication is viewed via proxy. But it's not very elegant (Although
other applications such as for instance Zope seem to have the same problem).
Maybe we just need some more experience:-)
Michael
giacomo wrote:
> On Thu, 4 Apr 2002, Michael Wechner wrote:
>
>
>>Did you try mod_proxy?
>>
>>You will find some notes at
>>
>>http://www.wyona.org/docs/wyona-cms-docs/integrator-guide/virtual-server/proxy-apache.html
>>
>
> We had some issues with ProxyPass (I don't remember right now what it
> was) and used both like this:
>
> RewriteRule ^/cocoon/(.*)$ http://cocoonhost:8080/cocoon/$1 [P,L]
> ProxyPassReverse /cocoon/ http://cocoonhost:8080/cocoon/
>
> Giacomo
>
>
>>All the best
>>
>>Michael
>>
>>
>>
>>Liam Morley wrote:
>>
>>
>>>I read up on working with mod_rewrite in the Cocoon FAQ, and I'm having a
>>>bit of a hard time getting mod_rewrite to cooperate with my sessions.
>>>
>>>I've got the following in my Apache httpd.conf:
>>>
>>>RewriteEngine On
>>>RewriteLog "E:/rewrite.log"
>>>RewriteLogLevel 3
>>>RewriteRule /cms/(.*) /cocoon/cms/$1 [PT]
>>>
>>>
>>>Each time the page is visited, a new session ID is created. After checking
>>>the logs, I noticed that the JSESSIONID isn't getting passed when using
>>>mod_rewrite. Here's an excerpt from the log without using mod_rewrite:
>>>
>>>PARAM: 'cookie' VALUES: '[JSESSIONID=A897E11152D430961782D5C9D9E67211;
>>>CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
>>>PARAM: 'connection' VALUES: '[Keep-Alive]'
>>>PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
>>>PARAM: 'referer' VALUES: '[http://localhost/cocoon/cms/info/mission.html]'
>>>PARAM: 'accept' VALUES: '[image/gif, image/x-xbitmap, image/jpeg,
>>>image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
>>>application/msword, */*]'
>>>PARAM: 'accept-language' VALUES: '[en-us]'
>>>PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0; Windows
>>>NT 5.1; Q312461)]'
>>>PARAM: 'host' VALUES: '[localhost]'
>>>
>>>And here's what happens when I use mod_rewrite:
>>>PARAM: 'cookie' VALUES:
>>>'[CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
>>>PARAM: 'connection' VALUES: '[Keep-Alive]'
>>>PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
>>>PARAM: 'referer' VALUES: '[http://localhost/cms/news/news_story_1.html]'
>>>PARAM: 'accept' VALUES: '[*/*]'
>>>PARAM: 'accept-language' VALUES: '[en-us]'
>>>PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0; Windows
>>>NT 5.1; Q312461)]'
>>>PARAM: 'host' VALUES: '[localhost]'
>>>
>>>As you can tell, there's no JSESSIONID when I use mod_rewrite.. also, the
>>>'accept' parameter is different.
>>>
>>>If anybody can help me, I'd greatly appreciate it. Thanks:)
>>>
>>>Liam Morley
>>>
>>>
>>>---------------------------------------------------------------------
>>>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: <co...@xml.apache.org>
>>>For additional commands, e-mail: <co...@xml.apache.org>
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>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: <co...@xml.apache.org>
>>For additional commands, e-mail: <co...@xml.apache.org>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: working with mod_rewrite
Posted by Liam Morley <lm...@lovecraft.gdc.wpi.edu>.
Thank you to Michael and Giacomo for their help. After looking through the
Apache documentation on mod_proxy and applying Giacomo's advice, I wound
up with the following..
RewriteRule ^/cocoon/(.*)$ http://cocoonhost:8080/cocoon/$1 [P,L]
ProxyPassReverse /cocoon/ http://cocoonhost:8080/cocoon/
That was successful. When I tried shortening this a bit to the following,
tomcat session IDs stopped getting through:
RewriteRule ^/(.*)$ http://cocoonhost:8080/cocoon/myapp/$1 [P,L]
ProxyPassReverse / http://cocoonhost:8080/cocoon/myapp/
What am I missing? Thanks again for all the help..
I've also added the following, although I don't believe it has anything to
do with my problem:
RewriteRule /(static)|(icon)/.* - [L]
This allows me to counter the above rule so I can have images and static
pages served by Apache.
Liam Morley
On Thu, 4 Apr 2002, giacomo wrote:
> We had some issues with ProxyPass (I don't remember right now what it
> was) and used both like this:
>
> RewriteRule ^/cocoon/(.*)$ http://cocoonhost:8080/cocoon/$1 [P,L]
> ProxyPassReverse /cocoon/ http://cocoonhost:8080/cocoon/
>
> Giacomo
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: working with mod_rewrite
Posted by giacomo <gi...@apache.org>.
On Thu, 4 Apr 2002, Michael Wechner wrote:
> Did you try mod_proxy?
>
> You will find some notes at
>
> http://www.wyona.org/docs/wyona-cms-docs/integrator-guide/virtual-server/proxy-apache.html
We had some issues with ProxyPass (I don't remember right now what it
was) and used both like this:
RewriteRule ^/cocoon/(.*)$ http://cocoonhost:8080/cocoon/$1 [P,L]
ProxyPassReverse /cocoon/ http://cocoonhost:8080/cocoon/
Giacomo
>
> All the best
>
> Michael
>
>
>
> Liam Morley wrote:
>
> > I read up on working with mod_rewrite in the Cocoon FAQ, and I'm having a
> > bit of a hard time getting mod_rewrite to cooperate with my sessions.
> >
> > I've got the following in my Apache httpd.conf:
> >
> > RewriteEngine On
> > RewriteLog "E:/rewrite.log"
> > RewriteLogLevel 3
> > RewriteRule /cms/(.*) /cocoon/cms/$1 [PT]
> >
> >
> > Each time the page is visited, a new session ID is created. After checking
> > the logs, I noticed that the JSESSIONID isn't getting passed when using
> > mod_rewrite. Here's an excerpt from the log without using mod_rewrite:
> >
> > PARAM: 'cookie' VALUES: '[JSESSIONID=A897E11152D430961782D5C9D9E67211;
> > CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
> > PARAM: 'connection' VALUES: '[Keep-Alive]'
> > PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
> > PARAM: 'referer' VALUES: '[http://localhost/cocoon/cms/info/mission.html]'
> > PARAM: 'accept' VALUES: '[image/gif, image/x-xbitmap, image/jpeg,
> > image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
> > application/msword, */*]'
> > PARAM: 'accept-language' VALUES: '[en-us]'
> > PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0; Windows
> > NT 5.1; Q312461)]'
> > PARAM: 'host' VALUES: '[localhost]'
> >
> > And here's what happens when I use mod_rewrite:
> > PARAM: 'cookie' VALUES:
> > '[CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
> > PARAM: 'connection' VALUES: '[Keep-Alive]'
> > PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
> > PARAM: 'referer' VALUES: '[http://localhost/cms/news/news_story_1.html]'
> > PARAM: 'accept' VALUES: '[*/*]'
> > PARAM: 'accept-language' VALUES: '[en-us]'
> > PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0; Windows
> > NT 5.1; Q312461)]'
> > PARAM: 'host' VALUES: '[localhost]'
> >
> > As you can tell, there's no JSESSIONID when I use mod_rewrite.. also, the
> > 'accept' parameter is different.
> >
> > If anybody can help me, I'd greatly appreciate it. Thanks:)
> >
> > Liam Morley
> >
> >
> > ---------------------------------------------------------------------
> > 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: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
>
>
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: working with mod_rewrite
Posted by Michael Wechner <co...@wyona.org>.
Did you try mod_proxy?
You will find some notes at
http://www.wyona.org/docs/wyona-cms-docs/integrator-guide/virtual-server/proxy-apache.html
All the best
Michael
Liam Morley wrote:
> I read up on working with mod_rewrite in the Cocoon FAQ, and I'm having a
> bit of a hard time getting mod_rewrite to cooperate with my sessions.
>
> I've got the following in my Apache httpd.conf:
>
> RewriteEngine On
> RewriteLog "E:/rewrite.log"
> RewriteLogLevel 3
> RewriteRule /cms/(.*) /cocoon/cms/$1 [PT]
>
>
> Each time the page is visited, a new session ID is created. After checking
> the logs, I noticed that the JSESSIONID isn't getting passed when using
> mod_rewrite. Here's an excerpt from the log without using mod_rewrite:
>
> PARAM: 'cookie' VALUES: '[JSESSIONID=A897E11152D430961782D5C9D9E67211;
> CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
> PARAM: 'connection' VALUES: '[Keep-Alive]'
> PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
> PARAM: 'referer' VALUES: '[http://localhost/cocoon/cms/info/mission.html]'
> PARAM: 'accept' VALUES: '[image/gif, image/x-xbitmap, image/jpeg,
> image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
> application/msword, */*]'
> PARAM: 'accept-language' VALUES: '[en-us]'
> PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0; Windows
> NT 5.1; Q312461)]'
> PARAM: 'host' VALUES: '[localhost]'
>
> And here's what happens when I use mod_rewrite:
> PARAM: 'cookie' VALUES:
> '[CMSUSER=mMsjah1coqlTGONdauaj1HrXi%2Fi2nT0lSZBixdwP%2BwQ%3D]'
> PARAM: 'connection' VALUES: '[Keep-Alive]'
> PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
> PARAM: 'referer' VALUES: '[http://localhost/cms/news/news_story_1.html]'
> PARAM: 'accept' VALUES: '[*/*]'
> PARAM: 'accept-language' VALUES: '[en-us]'
> PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0; Windows
> NT 5.1; Q312461)]'
> PARAM: 'host' VALUES: '[localhost]'
>
> As you can tell, there's no JSESSIONID when I use mod_rewrite.. also, the
> 'accept' parameter is different.
>
> If anybody can help me, I'd greatly appreciate it. Thanks:)
>
> Liam Morley
>
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>