We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25357
    • 92 Posts
    Currently working with 2.0.8 on two separate Linux servers, one dedicated, one VPS, but have had this problem ever since I can remember.

    We are working with extensionless URL’s, so content-type text/html has no extension in system settings. XML is of course set for .xml. Everything is otherwise working fine.

    I am using GoogleSiteMap, but have tried other sitemap programs to work around this, it doesn’t seem like it’s associated with the package, it’s something in modX (guess.)

    The server(s) are configured to send text/html content types; when I create an empty sitemap.xml file, the proper headers are sent.

    The resource XML Sitemap has an alias of sitemap.xml, and the content contains only

    [[!GoogleSiteMap]]

    in a blank template. When I say blank, I mean the template only contains

    [[*content]]

    With the content type in Page Settings for the resource is set to HTML (text/html) it works fine. Generates the sitemap - but it sends a text/html header, as you’d expect. The result is an not-so-pretty-looking XML file within a browser. As soon as I set it to XML (text/xml) I get a 404/not found page.

    We’ve let it go because Google will read it with text/html headers, but it’s still not right. Since it’s on every install I manage, I can’t help thinking it’s something I’m missing. Any ideas?


      • 26016
      • 561 Posts
      Not sure about that app, but anytime I’ve used MODx for any type of XML, I use no template at all, not a template with content or anything else in it.
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 22303 MODX Staff
        • 10,725 Posts
        Hopefully the alias is just sitemap; the content type configuration is responsible for adding the .xml, otherwise it would be generated as sitemap.xml.xml
          • 25357
          • 92 Posts
          Well, with the content type as "extensionless" you have to include it or it won’t work at all. smiley But yeah, when changing to XML type, removed the extension from the alias. I’ve tried all sorts of stuff. However samba gives me an idea, haven’t tried a plan old document, though seems like it would be the same.