We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
XML Sitemap Not Parsing
I've set up an XML sitemap using this navigation template (replacing example URL with my own):
<perch:before><?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> </perch:before> <url> <loc>http://example.com<perch:pages id="pagePath" /></loc> </url> <perch:after> </urlset> </perch:after>
And a file in the root of the website called 'sitemap.xml' which contains this (my Perch directory is the default '/perch'):
<?php header('Content-type: application/xml'); include('perch/runtime.php'); perch_pages_navigation(array( 'template' => 'sitemap.html', 'flat' => true, 'hide-extensions' => true )); ?>
I've then added this line to my .htaccess file to parse the XML as PHP:
AddType application/x-httpd-php .php .htm .html .xml
Now, I can't view the XML file (it just downloads a copy when I browse to the file) and the Google Sitemap test is throwing this error: "Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead."
Perch doesn't appear to be doing anything to the file - is this pointing to a problem in my .htaccess file?
My hosting is with Media Temple which uses the same MIME Type and as far as I can see, it should be working.
Want to reply to this thread?Login with Perch