我使用這個路由過濾ASP.Net MVC 5路由通配符查詢字符串+
[Route("search/{*segments}")]
這需要所有我所提供的部分可能是很多。
下面是一個例子
http://localhost:50877/search/c_50_showcases%5E-displays/a_brand-name:33113319_balt:1623762%7Cmooreco:1672386/a_total-number-of-shelves:33111115429_5:3138:lt/so_ts
現在我還需要查詢字符串這條路,但我無法使它工作。
http://localhost:50877/search/?query=HP%20DesignJet&items=HEW51645A|ELI75220
它給我403
錯誤。
Web服務器被配置爲不列出該目錄
我怎麼能做出可以採取通配符和查詢字符串處理傳入的請求路由的內容。我必須在Route
中使用search
。
我也試圖與這個
http://localhost:50877/search/test?query=HP%20DesignJet&items=HEW51645A|ELI75220
它的工作原理,但這種效應的SEO。
參見[Web服務器配置爲不列表這個目錄的內容](http://stackoverflow.com/a/32143133/181087) – NightOwl888