2011-09-02 44 views
1

我正在部署一個rails應用程序。目前我有一個臨時URL。有人可以指導我如何將這個路由到我的控制器和行動?路由Temproray URL到控制器和操作

臨時網址是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) 

任何幫助將不勝感激。

+1

看到這個答案http://stackoverflow.com/questions/3181746/what-is-the-replacement-for-actioncontrollerbase-relative-url-root – iafonov

+0

@iafonov:不知道這是否會達到目的,但讓我看看我是否可以在我的情況下使用它。感謝您的答覆。 – user814446

回答

0

我所要做的就是讓這樣的路線:

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

工作就像一個魅力。