Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi,

Is there any way to get an editable region of type image to use the relative URL instead of the absolute URL?

I have had a look at the documentation: http://www.couchcms.com/docs/tags-refer ... image.html but I cant find any mention of it.

All of my images are being shown as:

<img src="http://127.0.0.1/MySite/couch/images/image.jpg" />

Which works fine on my local machine, however then when I do a backup of the couch schema and put it on the actual domain, that link obviously doesn't work.

What I want is: <img src="couch/images/image.jpg" /> which would work in both scenarios.

Many Thanks
Hi Kirk,

As far as the 'image' type editable region is concerned, you have nothing to worry about :)
Try migrating your site and you'll find that once your site is moved, all image regions automatically begin showing the new URL.

Regards
Hi KK,

You are of course right, embarrassingly I had forgotten to change 'K_SITE_URL' in the config.php

Thanks again for your help.
You are welcome, Kirk.

The 'K_SITE_URL' setting in config.php that you mentioned - it is normally not necessary to set it at all.
Couch usually senses the site's URL by itself. It is only in the rare case that it fails to do so (or does so incorrectly) that we are required to lend it a helping hand by explicitly hard-coding the URL.

Of course, if you have set it to a particular value and then move the installation to another server, the specified value will be used (as is what seemed to have happened in your case).
4 posts Page 1 of 1