最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

What is the best way to strip the domain from all links and references?

programmeradmin0浏览0评论

Wordpress puts the domain name in every single image, css LINK element and any other reference. Many users have issues because of this when it comes to moving the page or accessing it from multiple domains. There are only a few situations in multisites when the behaviour is helpful because some assets are shared.

It is not possible to clear the siteurl option field in admin interface. What is the best way of getting rid of the domain? I read in the Wordpress source code. All these URL generating functions directly use the option siteurl. So the best way seems to be clearing siteurl in wp_options table, but this breaks Wordpress.

Another approach would be hooking into site_url action. But this has a strange behaviour restoring full URLs and is not always called.

发布评论

评论列表(0)

  1. 暂无评论