Wrong patial sitemap URLs in sitemap_index

Recommend this page to a friend!

      Sitemap Generator  >  All threads  >  Wrong patial sitemap URLs in...  >  (Un) Subscribe thread alerts  
Subject:Wrong patial sitemap URLs in...
Summary:Wrong patial sitemap URLs in sitemap_index
Messages:1
Author:Mixalis Pol
Date:2012-05-11 20:11:11
 

  1. Wrong patial sitemap URLs in...   Reply   Report abuse  
Picture of Mixalis Pol Mixalis Pol - 2012-05-11 20:11:11
For large sitemaps you need to create multiple compressed sitemap file and one sitemap_index.xml file which links them together and informs the search engine of the location and names of these files.

Everything works fine if you don't deviate from the predefined path which is the root of the site.
I want the sitemap files to be created to a custom folder.
I do that by using the following line:

$sitemap = new SitemapGenerator("http://www.mydomain.com/", "custom_folder/general_");

This stores all sitemap files (sitemap_index.xml & compressed sitemap files) in custom folder with the prefix "general_".

The problem is that in the sitemap_index.xml file the URLs of the partial compressed sitemap files are wrong..! Instead of "http://www.mydomain.com/custom_folder/general_sitemap1.xml.gz" the URL is "http://www.mydomain.com/general_sitemap1.xml.gz"

I have to go and correct the URLs manually... :(

What should I alter in the class code in order to fix this problem??

Thanks!

 

For more information send a message to info at phpclasses dot org.