问题描述
是否有任何快速简便的方法可以让后端转到/admin 而不是/refinery?
Is there any quick and easy way to make the backend go to /admin instead of /refinery?
我浏览了文档并查看了 gem 本身以找到有关此的任何信息,但是我什么也没想到.如果这在没有重大黑客攻击的情况下是不可能的,那么我也很高兴知道能够将这些信息传递给我的客户(我个人可能不太关心路线).
I looked through the docs as well as looked at the gem itself to find any information on this, however I came up with nothing. If this is not possible without major hacking, that would be great to know as well, to be able to pass that info onto my client (i personally could care less about the route).
推荐答案
我在 config/routes.rb
中添加了以下行.请注意,这必须之前 mount Refinery::Core::Engine, :at =>'/'
:
I added the following line to config/routes.rb
. Be aware that this must come before mount Refinery::Core::Engine, :at => '/'
:
match '/administrator' => redirect('/refinery')
# inserted by Refinery:
mount Refinery::Core::Engine, :at => '/'
这会将 http://example.com/administrator 重定向到 http://example.com/refinery 这将打开后端.
This will redirect http://example.com/administrator to http://example.com/refinery which will open up the backend.
抱歉回复延迟,但我最近也遇到了同样的问题.
Sorry for the delayed response, but I was running into the same problem myself recently.
这篇关于如何让refinerycms 后端转到/refinery 的/admin?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!