I have WordPress blog on server {IP}/blog.
Recently I’ve bought 2 domains and configured 2 virtual hosts in Apache for this blog. This works but all links on site are directing to old location {IP}/blog/link_href.
I’ve tried to change WP_HOME and WP_SITEURL to $_SERVER[‘SERVER_NAME’] but this leads to links like www.sth.com/www.sth.com/link with double.
If these are links you wrote yourself then they need to either be relative or have http in the front. The browser adds the site URL to relative links automatically.
This may not be it for you… But I have seen it happen a couple of times now for wordpress users.