【问题标题】:rails 301 redirect automationrails 301 重定向自动化
【发布时间】:2013-12-14 01:39:27
【问题描述】:

我有这样的链接

http://www.xxx.com/designers/ 

我想将这些链接重定向(301)到

http://www.xxx.com/designers 

有没有办法自动为我的所有路线执行此操作?

【问题讨论】:

标签: ruby-on-rails redirect routes


【解决方案1】:

你可以做类似的事情

get "/designers" => redirect("/designers")

只需使用正则表达式来自动化它

【讨论】:

    猜你喜欢
    • 2011-11-17
    • 2012-04-20
    • 2011-12-20
    • 1970-01-01
    • 1970-01-01
    • 2016-08-25
    • 2021-05-09
    • 2015-04-07
    相关资源
    最近更新 更多