0
我試圖創建我的應用程序使用sitemap_generator gem.子域但是,我得到一個錯誤,我的代碼那裏設有一個站點地圖:軌道/ Sitemap_Generator:二級域名的站點地圖
the scheme http does not accept registry part: .foo.com (or bad hostname?)
我的地圖。 rb:
SitemapGenerator::Sitemap.default_host = "http://www.foo.com"
SitemapGenerator::Sitemap.sitemaps_host = "http://s3.amazonaws.com/foo/"
SitemapGenerator::Sitemap.public_path = 'tmp/'
SitemapGenerator::Sitemap.sitemaps_path = 'sitemaps/'
SitemapGenerator::Sitemap.adapter = SitemapGenerator::WaveAdapter.new
SitemapGenerator::Sitemap.create do
add '/home'
end
Customer.find_each do |customer|
SitemapGenerator::Sitemap.default_host = "http://#{customer.user_name}.foo.com"
SitemapGenerator::Sitemap.sitemaps_path = "sitemaps/#{customer.user_name}"
SitemapGenerator::Sitemap.create do
add '/home'
end
end
我在做什麼錯?
看看[文檔](https://github.com/kjvarga/sitemap_generator#generating-multiple-sitemaps)。這幫了我很多! – Hiasinho