httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beyaNet <>
Subject [users@httpd] VirtualHost/RewriteRule Issue
Date Sat, 30 Oct 2004 10:22:41 GMT

this is my first mail to the forum so please bare with me. I have a 
requirement whereby users who request a page:

are actually, behind the scenes, redirected to:

So I tried the following:

RewriteEngine on
RewriteRule (.*)\.xml$ cocoon/mysite/$1.xml [P]
RewriteRule (.*)\.xsl$ cocoon/mysite/$1.xsl [P]
RewriteRule (.*)\.kont$ cocoon/mysite/$1.kont [P]
RewriteRule (.*)\.jx$ cocoon/mysite/$1.jx [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]

But this resulted in the following problem explained to me by another 

'The user goes to
Apache forwards it to
Cocoon creates a session cookie for domain, with 
path /cocoon
Apache returns this page to the user, with this session cookie
User requests
Browser looks to see if it has any cookies for, 
directory /. It doesn't. It has one for /cocoon, but not one for /, so 
it doesn't send the cookie to the server.


What you need to do is make sure your Apache URLs use the same 
directories as your Cocoon ones.
For virtual hosting, I have Jetty match on virtual host names, so 
webapps are mounted based upon the domain names, rather than based upon 

Can someone please show me the best way to resolve this issue?

many thanks in advance


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message