Hi Richard,

I was insisting on using relative paths because I am adapting an existing website with many pages to magnolia, and I thought maybe there is a way to leave the masses of relative links unchanged. I do not have access to the apache configuration, so I will have to update all the relative links.

Thanks for your help and info.

Richard Kogelnig schrieb:
Why do you insist on relative paths?
If you dislike the notion of ${request.contextPath} and you are using Apache to server the webpage consider using mod_rewrite.

<VirtualHost 1.1.1.1>
   ServerName site1.com
   ServerAlias  site1.com
   RewriteEngine on
   RewriteRule ^/docroot/(.*) /magnoliaPublic/docroot/$1 [PT,L]
...
   RewriteRule ^/(.*) /magnoliaPublic/site1/$1 [PT]
   JkMount /* public
</VirtualHost>

every request which starts with docroot is redirected to your contextPath of magnoliaPublic, thus eleminating the need for the ${request.contextPath} solution.

The solution looks strange, but I had to use mod_rewrite anyway because I am serving several sites out of one magnolia Instance (still 2.x) (btw the howto of serving multiple sites in the wiki is not up to date, or plain wrong)

Greetings



----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to