I have a testing blog located at domain.com/
_basic.config.php has baseurl http://www.domain.com
When I post to that blog, I manually link images as: <a href="/media/blogs/slugname/this-is-an-image.jpg"><img src="/media/blogs/slugname/this-is-an-image.jpg" /></a>
When I hover the mouse over that image, the link displayed in the bottom of the browser is: domain.com/media/blogs/slugname/this-is-an-image.jpg
Everything in this test blog works properly.
I copied the database to a new database.
I copied the entire blog folder to a new test location: domain.com/subfolder/
_basic.config.php now has baseurl http://www.domain.com/subfolder/
When I load that new test blog, the content displays but none of the images load.
When I hover over them, the link displayed at the bottom of the browser is:
domain.com/media/blogs/slugname/this-is-an-image.jpg
instead of
domain.com/subfolder/media/blogs/slugname/this-is-an-image.jpg
So... what is the correct way to create relative links from blog base to images under /media/ without using the full http://www.domain.com/path/to/media/image.jpg path?
Or you could use
../../media/etc.
The starting point of your relative path is the current skin directory.To avoid all this you should probably use the b2evolution short tags instead: http://b2evolution.net/man/back-office-reference/collections/posts/short-tags-reference/