1
我正在使用與Scala一起玩2。我想定義一個路由器規則,使任何錯誤的URL被重定向到根:如何在Play2中使用通配符定義url路徑?
# Home page
GET / controllers.Application.index(ignore="")
# global fall over
GET /*ignore controllers.Application.index(ignore)
這是醜陋的,我必須定義一個無用的參數,以滿足語法...任何想法如何刪除ignore
參數?
良好的漁獲,謝謝,我已經編輯答案。 – Infinity
把它當作錯誤處理...爲什麼我不這樣想。謝謝! – davidshen84