Adrian,

Do you know that you can define virtual URI mappings in Magnolia? This is implemented as a Filter, but it only works with the URI. So it cannot be used but you can learn from that filter.

You should create a new filter. This is what to do:

1. Create a filter class extending OncePerRequestAbstractMgnlFilter
2. Implement the doFilter method:
- have a look at info.magnolia.cms.filters.VirtualUriFilter to see how this can be done
- execute this filter only if URI == "/"
- use request.getServerName() to determine the redirectURL
- redirect with response.sendRedirect(request.getContextPath() + redirectUrl)
3. Deploy the filter class
4. Start Magnolia
5. Add the filter to the filter chain (config:/server/filters) before the virtualURIFilter
6. Try out

Ralf

Adrian Butnaru schrieb:
Thanks Guys,
Excellent resources but I am running Magnolia with Tomcat only. Should
I try to edit the virtual hosts in server.xml and to direct each host
to the URLs of each subtree from the magnolia public instance?

Has anybody more experience?

Adrian


On Fri, Jan 30, 2009 at 1:44 PM, Ganesh Gembali <[email protected]> wrote:
Hi Adrian,

Yes its possible. You can do this by configuring the subscribers in
configurations. You can create multiple subscribers there. But you should
have multiple public instances.

If you dont want multiple public instances , you can achieve this behavior
by configuring the Webserver setting ( In my case I have used this option to
run 2 sites with Apache2+ Tomcat + Magnolia 4.x).

Ganesh Gembali,
Software Consultant,
Xebia IT Architects Pvt Ltd,
http://ganeshgembali.wordpress.com.

Adrian Butnaru wrote:
Hi,
Is it possible to handle multiple websites (with respective dms,
users, etc.) only with one Magnolia Author CE instance?

For example to have in website:

--site1
       --page1
       --page2

--site2
      --page3
      --page4

and site1 subtree to be published at www.site1.com and site2 at
www.site2.com?

Thanks
A


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to