sitemap.php and google and mod rewrite

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

sitemap.php and google and mod rewrite

Post 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.
Last edited by pSouper on Tue 2. Mar 2010, 09:58, edited 2 times in total.
User avatar
Cipolla
Posts: 451
Joined: Sat 16. Feb 2008, 20:39
Location: Muppet Show

Re: sitemap.php and google and mod rewrite

Post by Cipolla »

...
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Re: sitemap.php and google and mod rewrite

Post 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 :)
User avatar
Oliver Georgi
Site Admin
Posts: 9903
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: sitemap.php and google and mod rewrite

Post by Oliver Georgi »

make an issuee on Google Code :)

P.S. I should visit you in London again without having another date...
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Re: sitemap.php and google and mod rewrite

Post 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 :)
Last edited by pSouper on Fri 21. May 2010, 09:39, edited 1 time in total.
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Re: sitemap.php and google and mod rewrite

Post by pSouper »

Also - you may want to turn 'bad behavior' off too.
Last edited by pSouper on Thu 29. Apr 2010, 22:22, edited 3 times in total.
User avatar
Oliver Georgi
Site Admin
Posts: 9903
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: sitemap.php and google and mod rewrite

Post by Oliver Georgi »

I have disabled Bad Behavior by default now.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply