2010-09-08, 08:07:55
Interesting thread... good point. Moving a site can be painful if there are many images in pages contents.
I can think of another simple way to do this (preferably from the beginning).
Go to settings. Don't use fancy permalinks, but:
- default URL schema (URL would be "SITE/index.php?id=page")
Or if you installed 2.02, you can use one of these:
- Custom permalink (mod_rewrite enabled): %slug% ("SITE/page")
- Custom permalink: ?id=%slug% ("SITE/?id=page")
(You see, no parent in URL.)
Now link your images with one of these relative paths:
“data/uploads/041.jpgâ€Â
or:
“./data/uploads/041.jpgâ€Â
I've only tested on localhost, but I think it should work... Even images are correctly displayed inline in the page editor.
Note: Not only images, you can also link your site's pages with relative URLs (<a href="page">) (Edit: <-- this would be for custom permalink %slug%)
I can think of another simple way to do this (preferably from the beginning).
Go to settings. Don't use fancy permalinks, but:
- default URL schema (URL would be "SITE/index.php?id=page")
Or if you installed 2.02, you can use one of these:
- Custom permalink (mod_rewrite enabled): %slug% ("SITE/page")
- Custom permalink: ?id=%slug% ("SITE/?id=page")
(You see, no parent in URL.)
Now link your images with one of these relative paths:
“data/uploads/041.jpgâ€Â
or:
“./data/uploads/041.jpgâ€Â
I've only tested on localhost, but I think it should work... Even images are correctly displayed inline in the page editor.
Note: Not only images, you can also link your site's pages with relative URLs (<a href="page">) (Edit: <-- this would be for custom permalink %slug%)