windows-10 - 为什么在社交媒体上从我的网站共享链接时会显示本地 IP 地址?
问题描述
为什么在社交媒体上从我的网站共享链接时会显示本地 IP 地址?我正在托管我的本地计算机 OS-Windows 10、IIS、反向代理的 odoo11 平台
看起来像这样
解决方案
看起来你只设置了 iis 反向代理入站规则,它只重写你的页面。要重写您的页面图像、链接等内容,您需要使用出站规则:
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://192.168.2.51/{R:1}" />
</rule>
</rules>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
<match filterByTags="A, Form, Img" pattern="^http(s)?://192.168.2.51/(.*)" />
<action type="Rewrite" value="http{R:1}://www.example.com/{R:2}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
推荐阅读
- reactjs - React 应用程序在本地正常运行,但在 Github 页面上不正常
- mysql - 带有 ROW_NUMBER 和 RIGHT JOIN 的 MYSQL 查询
- javascript - 如何在没有 bootstrap-vue 的情况下在 vue.js 2 中使用 bootstrap 4?
- sql - oracle 中的 Group by 无法使用 max
- vhdl - 如何为我的 Basys 3 FPGA 板上的四个 7 段显示器编写数据生成器?
- git - 如何列出仅提交到特定目录的 git 分支?
- c++ - 如何将 vscode 指向正确的头文件?
- python - 没有请求的 Django 测试 render_to_string()
- php - 登录woocommerce后在首页看不到价格
- string - 如何从我们从外部源动态发送的字符串中删除“_”