简体   繁体   English

移动浏览器显示错误的站点

[英]Mobile browser shows wrong site

I have a very weird issue going on.我有一个非常奇怪的问题。

I have a new website built with Asp.Net (previous site was possibly PHP on an Apache server).我有一个用 Asp.Net 构建的新网站(以前的网站可能是 Apache 服务器上的 PHP)。 The site's web records all point to IP 1.2.3.4 for example:该站点的 web 记录都指向 IP 1.2.3.4 例如:

When I type in当我输入

example.com

In a desktop browser it redirects to在桌面浏览器中,它重定向到

https://example.com

Everything works as expected.一切都按预期工作。 The rewrite URL had been used on other sites so I know it's not the rewrite causing the following problem.重写 URL 已在其他站点上使用过,所以我知道这不是导致以下问题的重写。

I clear my browser go into incognito on two different browsers and all works/shows the site as expected.我在两个不同的浏览器上将我的浏览器 go 清除为隐身状态,并且所有工作/显示该站点都按预期进行。

I now browse the same site on a mobile and it displays something completely different.我现在在手机上浏览同一个网站,它显示的东西完全不同。 When I say different I mean it shows the old site and the site was propagated over a week ago.当我说不同时,我的意思是它显示了旧站点,并且该站点是在一周前传播的。 I check the web records for both www and non www both point to the same IP address.我检查了 www 和非 www 的 web 记录都指向相同的 IP 地址。

So I decided to ping the site externally and both show as the correct IP.所以我决定从外部 ping 站点,两者都显示为正确的 IP。 I try a different mobile device and same problem.我尝试了不同的移动设备和同样的问题。

I think if it was a IP/DNS problem then it would happen everywhere regardless of the device.我认为如果这是一个 IP/DNS 问题,那么无论设备如何,它都会发生在任何地方。

Does anyone have any idea on what could be going wrong here?有谁知道这里可能出了什么问题? I don't know what's causing the mobile devices to show the old website?我不知道是什么导致移动设备显示旧网站? If anyone needs more info feel free to ask.如果有人需要更多信息,请随时询问。

You could try below workarounds to resolve the issue:您可以尝试以下解决方法来解决问题:

  1. Set the firewall inbound rule for the port number:设置端口号的防火墙入站规则:

    Open "Windows Defender Firewall and Advanced Security" select "Inbound Rules" click "New Rule..." select "Port" then add TCP port 12345(your site port number) and click next to finish the process.打开“Windows Defender 防火墙和高级安全”select“入站规则”单击“新规则...”select“端口”然后添加 TCP 端口号并单击下一步到您的站点

  2. Recycle your site application pool.回收您的站点应用程序池。

  3. Clear the browser cache.清除浏览器缓存。

  4. Check your DNS setting检查您的 DNS 设置

  5. Use iis client cache setting:使用 iis 客户端缓存设置:

  • Open Internet Information Services (IIS) Manager.打开 Internet 信息服务 (IIS) 管理器。

  • In the Connections pane, go to the site for which you want to disable caching.在“连接”窗格中,将 go 连接到要禁用缓存的站点。

  • From the middle pane, select HTTP Response Headers.从中间窗格中,select HTTP 响应标头。

    在此处输入图像描述

  • In the HTTP Response Headers pane, click Set Common Headers... in the Actions pane.在 HTTP Response Headers 窗格中,单击 Actions 窗格中的 Set Common Headers...。

  • In the HTTP Response Headers pane, click Set Common Headers... in the Actions pane.在 HTTP Response Headers 窗格中,单击 Actions 窗格中的 Set Common Headers...。

    在此处输入图像描述

Retsart your iis server.重新启动您的 iis 服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM