I have a jsp application setup with apache/tomcat. My main application is like www.foo.com/main/index.jsp . The content of my main applications is provided by many users. For these users I want to create mini-sites, each containing just the profile of the user and the content he has provided (so it's just a couple of jsp pages for each user). I have created a template which works like:
www.foo.com/userminisitefolder/index.jsp?userId=123
www.foo.com/userminisitefolder/profile.jsp?userId=123
www.foo.com/userminisitefolder/content.jsp?userId=123&contentId=898
How can I use mod_rewrite to map domains that belong to my users to the folder of my application also having the "?userId=123" part without needing to put it in the url:
eg: www.myusersdomain.com (translate with mod_rewrite to)->
www.foo.com/userminisitefolder/index.jsp?userId=123
(the url bar should remain "www.myusersdomain.com" of course)
www.myusersdomain.com/content.jsp?contentId=898 ->
www.foo.com/userminisitefolder/content.jsp?userId=123&contentId=898
etc
Thanks in advance