【发布时间】:2009-12-09 21:00:21
【问题描述】:
我最近在我的 Rails 应用程序中更改了一些 URL,我很好奇我是使用路由 + 控制器 + redirect_to 来转发旧 URL 更好,还是只使用 .htaccess 和 Apache 的 mod_rewrite?
我正在使用 Apache + Passenger,因此 htaccess 文件可以工作,但我很好奇这种事情是否有标准。
FWIW,网址已从以下位置更改:http://example.com/user/joeschmoe
【问题讨论】:
标签: ruby-on-rails .htaccess mod-rewrite routes