【发布时间】:2014-01-11 04:43:49
【问题描述】:
将多个 URL 指向同一个目的地是不好的做法吗?
请放心,这些网址是独一无二的。例如:
page.com/model/hello-there == page.com/model/hellothere == page.com/model/h-e-lloth-ere
所有内容都简化为字母 (/hellothere)。
这样做有什么缺点吗?谢谢!
【问题讨论】:
标签: ruby-on-rails url naming
将多个 URL 指向同一个目的地是不好的做法吗?
请放心,这些网址是独一无二的。例如:
page.com/model/hello-there == page.com/model/hellothere == page.com/model/h-e-lloth-ere
所有内容都简化为字母 (/hellothere)。
这样做有什么缺点吗?谢谢!
【问题讨论】:
标签: ruby-on-rails url naming
你所指的就是slugging
我强烈建议您查看该链接,以及包括 Slugalicious 和 Friendly_id 在内的一些宝石
这绝对没有问题,只要你正确地构建路线。例如,作为用户,我会欢迎/users/mark-zuckerberg 而不是users/109234230234/mark-zuckerberg/z22323(归根结底,这一切都与用户体验有关)
【讨论】: