Page 1 of 1

sitemap.php and google and mod rewrite

Posted: Thu 28. Jan 2010, 15:19
by pSouper
Hi all,

I have been looking into Sitemap.php phpwcms and mod rewrite - it seems that they do not work well together as mod_rewrite is processed independently of phpwcms
I think... Search engines are easily confused when it comes to comparing the pre-rewritten index.php?articleAlias with the resolved articleAlias.phtml urls.

If may assumptions are correct then you may need to modify your sitemap.php to reflect the re-written naming convention like so...

Change...

Code: Select all

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

Code: Select all

$_link = PHPWCMS_URL.setGetArticleAid( $data ).'.phtml';
or whatever your urls resolve too.

Re: sitemap.php and google and mod rewrite

Posted: Fri 29. Jan 2010, 08:36
by Cipolla

Re: sitemap.php and google and mod rewrite

Posted: Fri 29. Jan 2010, 09:00
by pSouper
many thanks C, I thought something was not right when i posted - I couldn't understand that the problem had not already been thought of by someone :)

Re: sitemap.php and google and mod rewrite

Posted: Fri 29. Jan 2010, 13:44
by Oliver Georgi
make an issuee on Google Code :)

P.S. I should visit you in London again without having another date...

Re: sitemap.php and google and mod rewrite

Posted: Fri 29. Jan 2010, 14:28
by pSouper
Hi OG,
You are welcome any time - just call when you know the flight times and I'll pop up town.

I don't think there is an issue now that C has pointed me in the right direction - I think the problem is with me not reading the forums properly I guess - short of you writing a .htaccess interpreter it would be very hard for you to compensate for mod rewrite :)

Re: sitemap.php and google and mod rewrite

Posted: Mon 1. Feb 2010, 11:20
by pSouper
Also - you may want to turn 'bad behavior' off too.

Re: sitemap.php and google and mod rewrite

Posted: Mon 1. Feb 2010, 11:51
by Oliver Georgi
I have disabled Bad Behavior by default now.