Newbie help: How to change path of /p_/images in dtml-tree
Hi, I defined the content of my site under the Zope folder '/home' which is directly under the 'Root Folder'. But this site is accessed by the url 'www.mydomain.com/Zope'. I managed to do this using a VirtualHost Monster, and Rewrite rule in Apache as follows: RewriteRule ^/Zope/(.*) http://localhost:8080/VirtualHostBase/http/www.mydomain.com:8000/VirtualHost... [L,P] My problem now is that I have a dtml-tree, and this tree access images from '/p_' directory using a relative path. For example, the expand button (+) in the tree is referenced as: <img src="/p_/pl" alt="+" border="0" /> This fails because the correct path should be 'Zope/p_/pl'. Is there a way that I can correct this url from dtml-tree? Thanks. Al
Alfredo P. Ricafort wrote at 2004-2-10 18:40 +0800:
I defined the content of my site under the Zope folder '/home' which is directly under the 'Root Folder'. But this site is accessed by the url 'www.mydomain.com/Zope'. I managed to do this using a VirtualHost Monster, and Rewrite rule in Apache as follows:
RewriteRule ^/Zope/(.*) http://localhost:8080/VirtualHostBase/http/www.mydomain.com:8000/VirtualHost... [L,P]
My problem now is that I have a dtml-tree, and this tree access images from '/p_' directory using a relative path. For example, the expand button (+) in the tree is referenced as:
<img src="/p_/pl" alt="+" border="0" />
This fails because the correct path should be 'Zope/p_/pl'.
Is there a way that I can correct this url from dtml-tree?
You must (unfortunately) change the code in "TreeDisplay/TreeTag.py". In a private (no longer accessible) version, I had reactivated the (now commented out) arguments "opened_decoration", "closed_decoration", ... arguments of "TreeTag.__init__". -- Dieter
On Wed, 2004-02-11 at 02:52, Dieter Maurer wrote:
You must (unfortunately) change the code in "TreeDisplay/TreeTag.py". In a private (no longer accessible) version, I had reactivated the (now commented out) arguments "opened_decoration", "closed_decoration", ... arguments of "TreeTag.__init__".
Thanks Dieter. But does that mean that cases such as mine, there will always be problem with dtml-tree? Is there some other way that I can service my website using a path different from the folder name without having this kind of problem? Thanks.
Alfredo P. Ricafort wrote at 2004-2-11 11:39 +0800:
... "dtml-tree" problems with "_vh_XXX" virtual hosting ... But does that mean that cases such as mine, there will always be problem with dtml-tree?
"_vh_XXX" virtual hosting is not used very often. But when it is used, it will have the problems your observed.
Is there some other way that I can service my website using a path different from the folder name without having this kind of problem?
You may be able to provide separate rewrite rules for URLs starting with "p_/" (and maybe "misc_/"), thus working around the the problem. Another approach (we use this one) is to use the tree support in "ZTUtils" and forget about "dtml-tree". There is an example in "Products/PageTemplates/examples". -- Dieter
participants (2)
-
Alfredo P. Ricafort -
Dieter Maurer