ASP.NET MVC: How to Route Search Term with . (Period) at the end

后端 未结 2 1727
暗喜
暗喜 2020-12-01 21:05

I get a 404 response from .Net MVC when I try to make a request where my search term ends with a . (period). This is the route that I\'m using:

         


        
2条回答
  •  猫巷女王i
    2020-12-01 21:42

    I have solved a similar issue (I had trouble with paths like /music/R.E.M.) I've added the following line into the system.webServer/handlers section (adjusted for your case):

     
    

    I've noted also, that

    
    

    does work only if the period (.) is somewhere in the middle pair of slashes (e.g. /abc/d.e/f) and does not work when the period looks like a file type separator (e.g. /abc/de/f.g).

提交回复
热议问题