Google sitemaps is telling me that http://rewardsdb.com/sitemap.php is not in an acceptable format? Any ideas why I would get this error and how I could fix it?
David,
I downloaded the sitemap.php distribution file and uploaded to my site. Now it is showing a single line readout rather than XML. So its an improvement since it isn't showing an error message but it still isn't working...
Any more ideas?
Hi Andrew,
If you do a view source on the generated sitemap, you will notice the following code preceeding the XML:
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
I notice that this code is also included (but not right at the top) on every other page on your site. This might mean that it is being included by a default include on every PHP script.
Do you know what mechanism is causing this output?
If you are using .htaccess; have a look in that file and see if there are any PHP settings that might cause a common header to be issued...
Cheers,
David.
It was me being sloppy in GoLive! I have removed that line from all the php files but it still doesn't look like it is working...
Hi Andrew,
The code has gone, but there are still 5 lines of white space in the same place - perhaps slightly more tweaking needed in GoLive!..?
Cheers,
David.
OK,
I got GoLive to re-write the sourcecode then hunted down the last few rogue spaces - and it now looks like it works. Wow - the hastles a little whitespace can cause....
Thanks again,
Andrew
Hi Andrew,
The URL is showing a PHP parser error on line 6 of sitemap.php. It is possible that the file may have become corrupted on your site. I would suggest uploading that file again from the distribution, and then visit your sitemap URL to check that you see an XML document as expected.
If the error still occurs, let me know and i'll investigage further with you.
Cheers,
David.