Content last modified Monday 3 September 2018
hop to #bottom
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

Serve your site as application/xhtml+xml

If you want to serve your Textpattern site with the proper MIME type, you need to edit publish.php, found in the /textpattern/ directory. (written for 4.0.3)

  1. Backup and open /textpattern/publish.php in a text editor
  2. Search for “text/html” (lines 115 and 439)
  3. Replace header("Content-type: text/html; charset=utf-8"); with Mark Pilgrim’s code

	if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
			header("content-type: application/xhtml+xml; charset=utf-8");
		else {
			header("content-type: text/html; charset=utf-8");

You can also download a new publish.php version too.

Article Request Count:
Posted here:
02 Jul 2006

You know you want to visit the Archives.
Published with Textpattern