这真的很奇怪。我的网站图像显示不正确。如果在网址末尾添加斜线,则会显示,否则它们不显示。请看:根据URL不显示图像:最后加上或不加破折号“/”
这到底是用破折号链接: http://jobbox.com.br/cocoonhealth/insurance/private-health-insurance/
要看到问题,删除破折号到底...。图像将不再显示了。
有趣的是,当我看着html代码,是完全一样的。我有一些特定的路线,但这个问题遍布整个网站。
我的路线:
查看plaincopy to clipboardprint? 公共静态无效的RegisterRoutes(RouteCollection路线)
{
// Ignore axd files such as assest, image, sitemap etc
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute("ServicesIndex", "services", new { controller = "Service", action = "Index" });
// Insurance Forms
routes.MapRoute("InsuranceIndex", "insurance", new { controller = "Service", action = "Insurance" });
routes.MapRoute("InsuranceForm_Corporate", "insurance/corporate-health-insurance", new { controller = "Service", action = "InsuranceCorporate" });
routes.MapRoute("InsuranceForm_Life", "insurance/life-insurance", new { controller = "Service", action = "InsuranceLife" });
routes.MapRoute("InsuranceForm_Private", "insurance/private-health-insurance", new { controller = "Service", action = "InsurancePrivate" });
// Claim Forms
routes.MapRoute("ClaimIndex", "claim", new { controller = "Service", action = "Claim" });
routes.MapRoute("ClaimForm_PersonalInjury", "claim/personal-injury-claim", new { controller = "Service", action = "PersonalInjury" });
// Surgery Forms
routes.MapRoute("SurgeryIndex", "surgery", new { controller = "Service", action = "Surgery" });
routes.MapRoute("SurgeryForm_LaserEye", "surgery/laser-eye-surgery", new { controller = "Service", action = "LaserEye" });
routes.MapRoute("Cocoon.AboutUs", "about-us", new { controller = "Home", action = "AboutUs" });
routes.MapRoute("Cocoon.ContactUs", "contact-us", new { controller = "Home", action = "ContactUs" });
routes.MapRoute("Cocoon.Profile", "profile/{login}", new { controller = "Profile", action = "Index", login = "" });
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
}
此外,CSS工作propoerly,它的指向同一个文件夹。 你知道发生了什么事吗?再次感谢你!