1

我正在登台服务器 staging.example.com 中测试我的 rails 应用程序

我关注了 railscast #123。我在我的应用程序中使用多个子域。

我想在生产和登台中使用相同的应用程序。

如何避免 staging.example.com 在我的登台服务器中将“登台”检测为子域,而不是将其视为域。

因为我必须像这样测试 url

          staging              production
test1.staging.example.com  test1.example.com
test2.staging.example.com  test2.example.com
4

1 回答 1

0
Hi ashwin I ran into different issue but hope the following solution helps you, 

Have you tried changing tld_sizes provided, if not in your environment.rb paste the following code 

SubdomainFu.tld_sizes = { :development => 0,
                          :test => 0,
                          :production => 1 }

and when you set :test => 0, and check the current subdomain is will give you "test1.staging.example" as your subdomain name and when you set it to 1 it will give you "test1" as your subdomain.
于 2013-10-25T11:31:45.583 回答