Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 localhost 的 IIS 上有一个 wordpress 站点。为了演示该站点,我使用ngrok使该站点可用。
在 localhost 上查看该站点时,一切看起来都很好。但是,当我通过 ngrok 隧道远程查看该站点时,会出现内容,但会丢失所有样式和主题元素。
我不确定哪些代码、配置或文档有助于解决这个问题。
知道为什么会发生这种情况吗?
发生这种情况是因为 wordpress 中的链接通常是绝对的,您需要强制 Wordpress 使用这些插件之一的相对 URL:
https://github.com/optimizamx/odt-relative-urls
http://wordpress.org/plugins/relative-url/