這真的很奇怪。我的網站圖像顯示不正確。如果在網址末尾添加斜線,則會顯示,否則它們不顯示。請看:根據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,它的指向同一個文件夾。 你知道發生了什麼事嗎?再次感謝你!