Yes. Your controller action can determine the friendly url based on how you would like the route defined for it, then do a Redirect to the friendly url instead of returning the view. It will cause another browser request which will add load to to your server, so you'd want to be sure that it was really important.
发布评论
评论(1)
是的。 您的控制器操作可以根据您希望为其定义的路由的方式确定友好的 url,然后重定向到友好的 url,而不是返回视图。 它将导致另一个浏览器请求,从而增加服务器的负载,因此您需要确保它确实很重要。
Yes. Your controller action can determine the friendly url based on how you would like the route defined for it, then do a Redirect to the friendly url instead of returning the view. It will cause another browser request which will add load to to your server, so you'd want to be sure that it was really important.