I am using MVC4 project and doing URL rewrite on Server side in RouteConfig
and appending .html
at the end of url of every page..
www.mysite.com/home.html
I have couple of pages and those pages are linked with home page (every think is working find in browser).
But when I validate using W3C link checker, I get broken link error message.
I really don't know what can be issue. One more thing if I replace .html
with .aspx
or any other extension it is validated by W3C. I don't know what is issue.
My code is:
routes.MapRoute(
name: "features",
url: "features.html",
defaults: new { controller = "Home", action = "features", page = UrlParameter.Optional }
);
Web.config
:
<add name="HtmlFileHandler" path="*.html" verb="GET"
type="System.Web.Handlers.TransferRequestHandler"
preCondition="integratedMode,runtimeVersionv4.0" />
Any help is highly appreciated