Page 1 of 1

Correct relative links for images and pages

Posted: Fri Feb 27, 2015 4:41 pm
by crb11
I've inherited an old 1.6.5 site which I've brought up to the current date, but now need to move it to another host.

The problem I have is that internal links to both pages and uploaded images are wrong. On the old setup, the root directory for CMSMS was in a directory /klice with respect to the server, so all my image links are /klice/uploads/images/... and page links /klice/index.php/... On the new one, I'm in /public_html, so everything is broken.

I have two questions: what to do about the current site, and what best practice is for the future.

I think that inserting a symlink /klice -> /public_html ought to make things work for now. I've been converting page links to cms_selflink, and instructing users to use the CMSMS linker.

However, I can't see what the parallel is for images, and - at least on my settings - the Insert/Edit Image tool seems to be doing the wrong thing. I have {metadata} set, and am getting a correct base tag of ".../public_html". I would expect that images should then be linked to as "uploads/images/..." but they're coming out as "/public_html/uploads/images" - fine for now, but it could break things if the site needs moving again.

So: what is best practice here? Am I misunderstanding something, and could my settings be wrong somewhere? (I can't see anything appropriate.)

Thanks.