【问题标题】:Route Temproray URL to controller and Action将临时 URL 路由到控制器和操作
【发布时间】:2012-05-13 18:20:06
【问题描述】:

我正在部署一个 Rails 应用程序。目前我有一个临时网址。有人可以指导我如何将其路由到我的控制器和操作吗??

临时网址是http://50.22.41.167/~aromaper/

我尝试做这样的事情,但它不起作用:

match "~aromaper" , :to => 'front#index'

这是来自 production.log 文件的错误消息:

Started GET "/~aromaper/" for 223.29.232.108 at 2011-09-01 22:03:11
-0500   Processing by ContentController#show as HTML   Parameters: {"path"=>"~aromaper"} Completed 500 Internal Server Error in 2ms Rendered public/404.html (0.0ms)

任何帮助将不胜感激。

【问题讨论】:

标签: ruby-on-rails ruby ruby-on-rails-3 routes


【解决方案1】:

我所要做的就是制作这样的路线:

match "/" , :to => "front#index"

工作就像一个魅力。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-18
    • 2015-10-20
    • 2013-09-01
    • 1970-01-01
    相关资源
    最近更新 更多