【发布时间】:2012-02-21 14:19:08
【问题描述】:
我正在创建简单的应用程序,某种投资组合。我听说最好在链接中添加 *.html 后缀,因为它可以让我在 Google 索引时获得更好的 SEO 结果...
无论如何,有没有办法修改默认路由/重写 url,使我的链接看起来像这样(我使用的是波兰语,它们对我的访问者来说是可读的):
domain.pl/index.html
domain.pl/kontakt.html
domain.pl/oferta.html
domain.pl/sklepy.html
这些链接被翻译成一个控制器(如 HomeController),但来自 {0}.html 链接的 {0} 将用作操作名称?或者更好的是,我想将 {0} 从 Url 映射到英文动作名称,例如:
index.html = index action
kontakt.html = contact action
oferta.html = offer action
sklepy.html = shops action
【问题讨论】:
标签: asp.net asp.net-mvc asp.net-mvc-3 iis-7 url-rewriting