tomcat - IIS 中 PNG 图像的 404 错误

标签 tomcat iis http-status-code-404 web-hosting

我在服务器 ABC 上托管了一个网站,该网站在 5000 端口上运行。我在 XYZ 服务器上托管了另一个站点,该服务器在端口 6000 上运行。当您点击 http://ABC:5000/mysite url 时,它会重定向到 http://XYZ:6000。所有这些都工作正常。

在 ABC 服务器的虚拟目录中,我有 img 文件夹,在该文件夹下有两个 png 图像。当我点击 http://XYZ:6000 时,一切正常。但是当请求来自 ABC 服务器(然后被重定向到 XYZ 服务器)时,系统会为这些图像提供 404 错误。请看下图。这两张图片的类型为 'text/html'

enter image description here

最佳答案

IIS 对任何未知文件类型(即没有 MIME 类型的文件)返回 404。将 png 添加到 IIS mime 类型。

关于tomcat - IIS 中 PNG 图像的 404 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25766208/

相关文章:

tomcat - CAS Tomcat SSLHandshakeException

c# - Server.Transfer 在 Application_Error 中不起作用

http - 当一个主题被删除时,我应该为公告板系统使用 404 Not found 还是 410 Gone?

angular - Angular2 中的 404 页面和延迟加载

php - 404使用$ _SERVER ['REQUEST_URI'处理错误]

java - Spring 日志不是特定于机器的

python - python 中的 "Permission Denied"从 jenkins 复制文件,而不是从 shell

windows - inetinfo.exe 始终出现在任务管理器中

tomcat - Apache Tomcat 5.5 不同上下文的别名

iis - 将 IIS 网站绑定(bind)到第二个 ColdFusion 实例