0

我的样式表中有以下条目:

html, body 
{ 
  background: #eee url('../Content/Images/texture.jpg') center;
}

我的样式表的位置是

C:\Websites\MyWebsite\Themes\Contoso\Styles\Site.css

纹理图像的位置是

C:\Websites\MyWebsite\Themes\Contoso\Content\Images\texture.jpg

IE8 似乎在解决相对路径方面存在一些问题。浏览网址 www.mysite.com/Clients/12345/Dashboard 会导致我的日志文件中出现以下条目:

2013-02-18 00:54:40 131.203.91.104 GET /Clients/12345/Content/Images/texture.jpg
 - 443 9260085 222.155.91.136 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+5.1;+Trident/4.0;+BTRS124349;+GTB7.4;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729) 
404 0 64 187

...

2013-02-18 00:54:40 131.203.91.104 GET /Themes/Contoso/Content/Images/texture.jpg
 - 443 9260085 222.155.91.136 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+5.1;+Trident/4.0;+BTRS124349;+GTB7.4;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729)
304 0 0 436

它请求的第一个 URL 会根据请求的 URL 进行更改。这发生在我网站上的 3 或 4 张其他图像上,但所有其他图像都很好。我想解决它,因为这些 404 阻塞了我的错误日志

以前有人见过这种行为吗?

干杯

4

1 回答 1

0

将 css 更改为以下内容后,所有 404 都消失了:

html, body 
{ 
  background: #eee url('/Themes/Contoso/Content/Images/texture.jpg') center;
}
于 2013-03-06T02:34:05.213 回答