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??