I've always found it frustrating in Wordpress that images, files, links, etc. are inserted into WordPress with an absolute URL instead of relative URL. A relative url is much more convenient for switching domain names, changing between http and https etc. Today I discovered that if you define WP_CONTENT_URL with a relative url then when you insert files into posts they use the relative url for the src instead of absolute url. Just what I've always wanted! But the official Wordpress documentation says that you should use a full URI if you are defining WP_CONTENT_URL.
Set WP_CONTENT_URL to the full URI of this directory (no trailing slash), e.g.
define( 'WP_CONTENT_URL', 'http://example/blog/wp-content');
Everyting seems to work fine when I use a relative URL, e.g.
define( 'WP_CONTENT_URL', '/my-content-folder');
But is there some problem with using a relative URI? I'm just thinking that there must be a reason for Wordpress stating that it should be defined with a full URI.
I solved it in my site making this in functions.php
I took part of one plugin, cut it into pieces and make this. It replaced ALL links in my site (menus, css, scripts etc.) and everything was working.