我在登台服务器staging.example.com
中测试我的rails应用程序我跟着railscast#123。 我在我的应用程序中使用多个子域名。
我想在制作和舞台上使用相同的应用程序。
如何避免staging.example.com在我的登台服务器中将'staging'检测为子域,而应将其视为域。
因为我必须像这样测试网址
staging production
test1.staging.example.com test1.example.com
test2.staging.example.com test2.example.com
答案 0 :(得分: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.