0
我需要为“toolsearch”页,“搜索”页面中的所有请求重定向所有的参数斯卡拉/电梯 - 如何使用params做页面重定向?
所以localhost:8080/toolsearch#?q=20
需要被重定向到localhost:8080/search#?q=20
我试图使用Boot添加liftrules为重定向
LiftRules.statelessRewrite.prepend {
case RewriteRequest(ParsePath("toolsearch" :: Nil, "", x, y), z, s) => {
RewriteResponse("search" :: "index" :: Nil, Map("page" -> "search")) //Works but the browser address bar says 'toolsearch' not 'search
// S.redirectTo("/search") //throws net.liftweb.http.ResponseShortcutException: Shortcut
// JsCmds.RedirectTo("/search") //doesnt compile
}
}
任何与此有关的帮助表示赞赏。谢谢。