Changing links base address
Hi, thanks to your help I've successfully searched and edited the content of the site (the guy who manged it is unavailable at the moment). Now when I look at the html I see there are a lot of absolute links like: <base ... www.site.net <script ... www.site.net <link ... www.site.net...css <href ... www.site.net Because I have to change domain, I was looking to replace those links, with www.newsite.org What's the best way to do that? Would it be a good idea using relative links? I understand that my apache-zope configuration utilizes VirtualHostMonster to translate addresses so I guess absolute links could be there for good reason, right? This is apache+python2.3.5+zope2.8.7+plone2.1.2 Thanks for your time -- Peppe
On 4/13/07, Peppe Top <peppetop@gmail.com> wrote:
thanks to your help I've successfully searched and edited the content of the site (the guy who manged it is unavailable at the moment). Now when I look at the html I see there are a lot of absolute links like:
<base ... www.site.net <script ... www.site.net <link ... www.site.net...css <href ... www.site.net
Because I have to change domain, I was looking to replace those links, with
www.newsite.org
What's the best way to do that?
Those absolute links are computed at rendering time, based on the hostname of the Zope server, or what the VHM sets the servername to. So if you use Apache rewrite rules with the VirtualHostMonster, you only have to change the rewrite rule and all absolute URLs will be correct. -- Martijn Pieters
in the html there are a lot of absolute links like:
<base ... www.site.net <script ... www.site.net <link ... www.site.net...css <href ... www.site.net
Because I have to change domain, I was looking to replace those links, with
www.newsite.org
What's the best way to do that?
Those absolute links are computed at rendering time, based on the hostname of the Zope server, or what the VHM sets the servername to. So if you use Apache rewrite rules with the VirtualHostMonster, you only have to change the rewrite rule and all absolute URLs will be correct.
Thanks a lot for the precise reply. Does this include the following? <style type="text/css"><!-- @import url(http://www.site.net/.../ploneStyles.css); --></style> (this is in the HEAD section) When I look at the "rendered" html (for example the homepage source), I see the above line, and I don't know if it's a Plone/Zope thing, or a comment I should delete/change. As a related subject, I see no way to edit html comments in the BODY section, using the Plone interface, should I use ZMI? Thanks again for your support. -- Peppe
On 4/13/07, Peppe Top <peppetop@gmail.com> wrote:
Thanks a lot for the precise reply.
Does this include the following?
<style type="text/css"><!-- @import url(http://www.site.net/.../ploneStyles.css); --></style>
(this is in the HEAD section)
Yes, that is included. If this is Plone, you really do not have to worry about this at all, the above comment is generated too.
As a related subject, I see no way to edit html comments in the BODY section, using the Plone interface, should I use ZMI?
The above code is likely to be generated in pagetemplates that are part of the Plone skin, which live on the disk (they are part of the Plone product). -- Martijn Pieters
Does this include the following?
<style type="text/css"><!-- @import url(http://www.site.net/.../ploneStyles.css); --></style>
(this is in the HEAD section)
Yes, that is included. If this is Plone, you really do not have to worry about this at all, the above comment is generated too.
Thanks, I cleared all my confusion! ...for now ;-) I was able to change the address using virtual host and rewrite (apache) plus VHM, like you suggested. Thanks again for the help. -- Peppe
participants (2)
-
Martijn Pieters -
Peppe Top