httpd-users mailing list archives

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

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

http://www.mysite.com/login.xml

are actually, behind the scenes, redirected to:

http://www.mysite.com:8080/cocoon/mysite/login.xml

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 
user:

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

Kerbang.

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 
folders.'

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

many thanks in advance

Andrew


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message