Page 1 of 1

Sitemap

Posted: Tue 6. Feb 2007, 11:06
by macmukka
I am looking to create a sitemap to submit to Google.

It looks like there was once a mod to do this. (Cant find a download)

http://www.phpwcms.de/forum/viewtopic.p ... sc&start=0

Do I still need a mod to do this or is it built in to phpwcms now?

I use 1.2.8.

Thanks - mac

Posted: Tue 6. Feb 2007, 17:06
by Oliver Georgi
check sitemap.php - it's included by default - no hack neccessary.

Oliver

Posted: Wed 7. Feb 2007, 23:49
by macmukka
thanks Oliver I'll check in to it!

Re: Sitemap

Posted: Tue 6. Jan 2009, 15:17
by sandro
Hi,

The Links inside the Sitemap are not correctly rewritten (Newest PHPWCMS Release and URL rewrite activated and working on the html pages:
<url>

<loc>http://myproject.com/index.php?Die-Kano ... fsatz</loc>
<lastmod>2008-12-29</lastmod>
</url>
it should be:
<url>

<loc>http://myyproject.com/kanon_aufsatz.phtml</loc>
<lastmod>2008-12-29</lastmod>
</url>
How can i change that? Or is something wrong configured?

Best Regards
Sandro

Re: Sitemap

Posted: Tue 6. Jan 2009, 16:27
by juergen
Hey Sandro

Total normal Behavior:

1.) Have the alias, with perhaps 3,4,5 ore more articles
2.) beyond this, the articles themselves.

Why changing ? Perhaps try to leave the alias blank.

and concerning the rewritten links: Did you change the var in config for rewrite from 0 to 1 ?

The same: http://ukw-tagung.com/sitemap.phtml , rewritten, and 283

Re: Sitemap

Posted: Tue 6. Jan 2009, 16:32
by sandro
Hi,

Thanks for replying

The part i don't like is the "index.php?" and missing *.phtml in the sitemap.
I want google to index exactly the urls my visitors see, otherwise i risk a duplicate content penalty. (Thats what they do if you have the same content under more than one url...)

Or do i get something wrong?
And of course, every alias is used only once.

Re: Sitemap

Posted: Tue 6. Jan 2009, 16:57
by juergen
hmm, ok then please check in :

../config/phpwcms/conf.inc.php:

Code: Select all

$phpwcms['rewrite_url']=1;
after this, the system will do what you expect ... I hope :D

Re: Sitemap

Posted: Tue 6. Jan 2009, 17:09
by sandro
The Rewriting on the Page is working well, the setting is already =1

Its only inside the Google XML Sitemap (/sitemap.php) where the rewriting is not working.

Re: Sitemap

Posted: Tue 6. Jan 2009, 18:26
by flip-flop
It can“t work, 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:

Code: Select all

// 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;

Substitute:

Code: Select all

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

Code: Select all

		// ---------------------------------------- +kh 09/01/06
		if ($my_rewrite) { $_link = PHPWCMS_URL.setGetArticleAid( $data ).'.phtml'; }
		else { $_link = PHPWCMS_URL.'index.php?'.setGetArticleAid( $data ); }
		// ---------------------------------------- 
  
Knut

Re: Sitemap

Posted: Tue 6. Jan 2009, 18:45
by juergen
ups, ok, this was my fault, I thought you where talking about the sitemap CP :oops:

Re: Sitemap

Posted: Mon 12. Jan 2009, 23:17
by larissa
Hi All
this is my site http://www.myflorenceguide.com/

can you please help me whit this:

if i rename _htaccess to .htaccess and apply to it suggested changes
i get a server error did it happen to you as well ?
Internal Server Error
and moreover what's excatly the right content of .htaccess and do i have to change something also in the category alias to have .phtml ?
in other words teach me step by step
many thanks
larissa

Re: Sitemap

Posted: Mon 12. Jan 2009, 23:58
by larissa
Sorry I just realize I should have posted here
http://forum.phpwcms.org/viewtopic.php? ... te#p112334
but however i solve it
by commenting
# php_flag magic_quotes_gpc Off
# php_flag register_globals Off
is that ok?
larissa