• Welcome to Sitemap Generator Forum.
 

Double slashes in sitemap file url

Started by CircuitTravel, November 27, 2013, 09:52:13 PM

Previous topic - Next topic

CircuitTravel

Hi,

I have just installed the generator and got it to generate a sitemap for one of my sites.  It is mostly fine except for extra forward (and backward) slashes in the URL for the actual sitemap file and for the xsl file linked in the sitemap.

The start of my sitemap.xml looks like this - I have highlighted the error


<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="http://devui03.ct.xmlsitemapgenerator[color=red][b]//[/b][/color]pages/mods/sitemap.xsl"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
   


And in the generator web page I see a similar thing - see attached screenshot.

I couldn't find anything in the doco or config to fix this.  Any suggestions on how to fix this?

Cheers,

James.

CircuitTravel

I fixed this one too, I think.

I have my generator site/code in a separate directory to my sites to keep things cleaner.  Because of this, the url for the xsl file for the sitemap was pointing to the wrong location.  I edited sitemap_xml_tpl.xml and sitemap_index_tpl.xml to get it to point to where I wanted the xsl. 

From this:

<?xml-stylesheet type="text/xsl" href="%GEN_URL%pages/mods/sitemap.xsl"?>



To this:

<?xml-stylesheet type="text/xsl" href="%GEN_URL%sitemap.xsl"?>


I also had to add a folder under my site root that was the same as the site root folder name for the generator.  I didn't go looking for where %GEN_URL% is set to try and remove it there. So my sitemap.site1.xml is at /siteroot/sitemap.site1.xml and the sitemap.xsl is under /siteroot/generatorname/sitemap.xsl

CircuitTravel

I took this one step further to save having to mess around with my deployment process.  I removed the line


<?xml-stylesheet type="text/xsl" href="%GEN_URL%pages/mods/sitemap.xsl"?>


and that way I didn't need to add extra files and  directories to my deployment package.  The sitemap is only read by a bot and it isn't interested in style sheets.

XML-Sitemaps Support

Hello,

there is a "Enable stylesheet for XML sitemap" setting that can be turned off in advanced generator configuraiton section.

CircuitTravel

Thanks for that Oleg.  I had not seen the setting.