-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where is the value of default_host coming from #51
Comments
Can you paste in your sitemap config? And what version of sitemap generator are you running? I can't think of any reason why your default_host would be ignored... |
The only way I can think of is if you are passing in full URLs to the add() method e.g. add root_url When it should be: add root_path. |
I am not adding anything in the "create" |
Sorry, I have the following entry in the "create" node. SitemapGenerator::Sitemap.default_host = "http://cheapr.me" |
Your config looks good. When I run it in a test Rails app it generates URLs with the correct hostname. The sitemap you link to doesn't look like it matches the one you are generating. I would suggest deleting the sitemaps in public/ and then running your sitemap gen again. Finally to be absolutely sure that you are seeing the correct sitemaps, you can call add like so: This forces the host for that URL. If you don't see anotherhost.com then you're not seeing the right sitemaps. |
I removed the earlier sitemap files, modified the "add" line with |
The sitemaps are compressed using GZip. You can uncompress them using WinZip, 7Zip or other tools. Then you can see the xml. Note that the URL for your sitemap is: http://cheapr.me/sitemap_index.xml.gz |
Thanks, I tried to expand the sitemap_index.xml.gz file - this file
Is the "loc" element pointing correctly ? Thanks, On Fri, Nov 25, 2011 at 1:05 AM, Karl Varga <
|
Yes it's correct. http://cheapr.me/sitemap1.xml.gz is the sitemap file with your '/view' URL in it. You can remove the :host option from your call to add() now because everything is working correctly. |
I have put the following config:
SitemapGenerator::Sitemap.default_host = "http://cheapr.me"
When I generate the site map, the "loc" is coming up as :
http://cheapr.in/
Check -http://cheapr.me/sitemap.xml
I grep'd but there nowhere there is "cheapr.in" in any of the files in my project (I confess that I had originally planned to have my site - cheapr.in) - so unless there is some spooky mind-reading going on, how is the LOC changed to cheapr.in ?
From where is this domain picked up (and why my default_host is ignored ?)
The text was updated successfully, but these errors were encountered: