Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Malformed response header of Txp-generated xml for sitemap
I’ve got Txp generating an xml sitemap for my site. Google and Bing seem to be happy with the sitemap, but when I open the page with Firefox or Opera so I can do a visual sanity check, the content is not recognized as xml and displays as unformatted text with all the xml tags removed. The Firefox developer tools highlight the initial <?xml>
tag in error pink. On the other hand, an xml file served directly (sitemap_index.xml
) looks fine in either browser. When I look at the headers, the only possibly relevant difference I see is that the Txp-created content has the response header entry content-length: 0
. content-length
is completely missing from the directly served file. Is this the issue, or is it something else?
Last edited by skewray (2024-07-27 17:17:57)
Offline
Re: Malformed response header of Txp-generated xml for sitemap
If you mean www.skewray.com/sitemap.xml, it is served as text/html
. How do you construct it?
Offline
Re: Malformed response header of Txp-generated xml for sitemap
I don’t see the text/html
in Firefox web developer tools (I am noob-level on this tool), but that would explain it. I made a Txp section
(“sitemap”) with no articles and a matching page
that spews the raw xml. .htaccess
directs site.com/sitemap.xml
to site.com/sitemap
. How do I change the mime type to text/xml
? Is that a php thing?
Last edited by skewray (2024-07-28 15:31:25)
Offline
Re: Malformed response header of Txp-generated xml for sitemap
skewray wrote #337487:
I don’t see the
text/html
in Firefox web developer tools (I am noob-level on this tool), but that would explain it. I made a Txpsection
(“sitemap”) with no articles and a matchingpage
that spews the raw xml..htaccess
directssite.com/sitemap.xml
tosite.com/sitemap
. How do I change the mime type totext/xml
? Is that a php thing?
Hi
this is how we do it in our site with a small addition to the htaccess.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Online
Re: Malformed response header of Txp-generated xml for sitemap
Aha… <txp:header>
is the secret sauce. Works now. Thank you!
Last edited by skewray (2024-07-28 15:51:41)
Offline