我有一个Asp.Net MVC 5网站。在Web.config
文件中,我在handlers
部分中有这些内容:
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
<add name="UrlRoutingHandler" type="System.Web.Routing.UrlRoutingHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" path="/user/*" verb="GET" />
</handlers>
基本上我希望website.com/user/...
捕获UserController
之后的所有内容。但遗憾的是,如果它以点.
结尾,则不起作用。例如:
website.com/user/test.
如何更改它以解决此问题?