为什么我的网站在社交媒体上分享链接时,会显示本地的ip地址?

问题描述 投票:-2回答:1

为什么我的网站在社交媒体上分享链接时,会显示本地的ip地址?

看来

如图

windows-10 iis-7.5 reverse-proxy odoo-11
1个回答
0
投票

看样子你只设置了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>
© www.soinside.com 2019 - 2024. All rights reserved.