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
Having problems with the Google Sitemap solution posted in docs.
I have a sitemap.xml file with
<?php header('Content-type: application/xml'); include('perch/runtime.php'); perch_pages_navigation(array( 'template' => 'sitemap.html', 'flat'=>true )); perch_blog_custom(array( 'template' => 'blog_sitemap.html', 'flat'=>true )); ?>
I also have this in the .htaccess
AddType application/x-httpd-php .php .xml
And this in the template
<perch:before><?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> </perch:before> <url> <loc>http://marketingalchemy.co.uk<perch:pages id="pagePath" /></loc> </url> <perch:after> </urlset> </perch:after>
When try to submit it to Google it has an error, so if I visit the xml page in a browser its says "This page contains the following errors: error on line 12 at column 3: Extra content at the end of the document"
However I cannot see an extra line, so any idea what I have done wrong?
Want to reply to this thread?Login with Perch