This is an old revision of the document!


Sitemap-XML (Google)

Multidomain sitemap.php

Enhanced version for using a start-Id in tree against a domain.

// Your strukture ID -> where would you like to start your sitemap?
$my_start_id = 22; //default if no domain name is given
// All Cat-IDs which have to be excluded permanently e.g. '4,7,34,9'
$_DISABLE_ID = '4,7,34,9'; // Test

// Add the respective START ID corresponding with your domain: remove comment slashes and enter them
$_DOMAIN_ID = array(

//  'domain1.de'   =>  array( 'ID' =>  1 ), 
//  'domain2.com'  =>  array( 'ID' =>  3 ), 
//  'domain3.ch'   =>  array( 'ID' => 11 ), 

);

<note tip>Available for persons those who write useful contributions, translations or video clips into the wiki. (Alternatively make an donation).</note>


Change index.php?alias to alias.phtml

Forum: http://forum.phpwcms.org/viewtopic.php?p=112317#p112317

Rewriting sitemap output with /sitemap.php for sitemap.xml file. (index.php?alias → /alias.phtml)

Normaly the rewrite to alias.phtml is a htaccess funktion via apache.

Patch for sitemap.php: (But only if you are using a standard .htaccess and rewrite to alias.phtml)

Insert between:

Begin:

require_once (PHPWCMS_ROOT.'/include/inc_front/front.func.inc.php');

Insert:

// enhanced by k.Heermann (flip-flop) for rewriting to alias.phtml
// --------------------------------------------------------------- +kh 09/01/06
$my_rewrite = false;
if ($phpwcms['rewrite_url'] >= 1  AND  file_exists('.htaccess')) { $my_rewrite = true; }
// ----------------------------------------------------------------

End:

// start XML 
echo '<?xml version="1.0" encoding="utf-8"?>'.LF;


and

Substitute:

 		$_link = PHPWCMS_URL.'index.php?'.setGetArticleAid( $data );

with:

		// ---------------------------------------- +kh 09/01/06
		if ($my_rewrite) { $_link = PHPWCMS_URL.setGetArticleAid( $data ).'.phtml'; }
		else { $_link = PHPWCMS_URL.'index.php?'.setGetArticleAid( $data ); }
		// ---------------------------------------- 
 
english/other-enhancements/sitemap-xml.1242688373.txt.gz · Last modified: 2018/06/03 18:08 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0