0

I have a custom route to simplify the url and only use the home controller implicitly, but by doing so I can no longer access my sitemap.xml form the default endpoint, how could I fix this?

'routes.MapRoute(
'    name:="OmitController",
'    url:="{action}/{id}",
'    defaults:=New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional}
')
rojobo
  • 476
  • 4
  • 16

1 Answers1

0

Nevermidn I looked at the source code and saw that the default route for the sitemap.xml is calling the XmlSiteMap and the Index action so I added this

    routes.MapRoute(
            "sitemap",
            "sitemap.xml",
            New With {.controller = "XmlSiteMap", .action = "Index"}
        )

and it works now

rojobo
  • 476
  • 4
  • 16