thanks for your reply. I understand what you have written thus far. In regards
to your statement:
'The solution is to have Apache and Cocoon/servlet container use the same directory nesting, e.g:
http://www.yoursite.com:80/hello.html --> http://www.yoursite.com:8080/hello.html
do I keep my http.conf file as it is:
RewriteRule (.*)\.xml$ cocoon/mysite/$1.xml [P] RewriteRule (.*)\.xsl$ cocoon/mysite/$1.xsl [P] RewriteRule (.*)\.kont$ cocoon/mysite/$1.kont [P] RewriteRule (.*)\.jxt$ cocoon/mysite/$1.jxt [P] RewriteRule (.*)\.xsp$ cocoon/mysite/$1.xsp [P] RewriteRule (.*)\.css$ cocoon/mysite/$1.css [P] RewriteRule (.*)\.js$ cocoon/mysite/$1.js [P] RewriteRule (.*)\.mp3$ cocoon/mysite/$1.mp3 [P] RewriteRule (.*)\.m3u$ cocoon/mysite/$1.m3u [P] RewriteRule (.*)\.jpg$ cocoon/mysite/$1.jpg [P]
taking into consideration that my workers2.properties file is:
[uri:/cocoon/mysite/*] group=lb
and make a port change in cocoon? If so where do I make the change? Should the rewriterule not take place before the mod_rewrite?
many thanks for your help
Andrew On 2 Nov 2004, at 06:43, Upayavira wrote:
beyaNet wrote:
Upayavira,
thanks for your reply. I'm not sure I quitefollow you as this whole Apache RewriteRule business is new to me. Could you possible give me an example of what you mean?
Sorry for the delay. I missed your message.
Take this:
user goes to www.yoursite.com:80/hello.html this redirects to www.yoursite.com:8080/cocoon/hello.html
When generating this page, Cocoon creates a session. When the servlet container creates a session, it will create it relative to the server and the _path_, i.e. www.yoursite.com and /cocoon. This is passed back to Apache, which returns a page to them with the url www.yoursite.com:80/hello.html, and a cookie for the path /cocoon.
When they then click on the link to www.yoursite.com:80/another.html, the browser says to itself, "Do I have any cookies for this path?", to which the answer is 'no', as the /cocoon cookie isn't relevant. But it should have been. It is your session cookie. Hence, when generating the another.html page, Cocoon will create a new session for it.
The solution is to have Apache and Cocoon/servlet container use the same directory nesting, e.g:
http://www.yoursite.com:80/hello.html --> http://www.yoursite.com:8080/hello.html
That's it really.
Now say you want to have:
http://www.myfirstsite.com:80/hello.html -> http://www.myfirstsite.com:8080/first/hello.html
http://www.mysecondsite.com:80/hello.html -> http://www.mysecondsite.com:8080/second/hello.html
You should switch that to:
http://www.myfirstsite.com:80/hello.html -> http://www.myfirstsite.com:8080/hello.html
http://www.mysecondsite.com:80/hello.html -> http://www.mysecondsite.com:8080/hello.html
and have either your servlet container mount different webapps based upon the hostname, or have Cocoon use the HostMatcher to mount different sitemaps based upon hostname.
Make sense now?
Regards, Upayavira
--------------------------------------------------------------------- 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]
