# Sitemap.xml und Google - 50000 URLs Begrenzung

**URL:** <https://forum.shopware.com/t/sitemap-xml-und-google-50000-urls-begrenzung/3665>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [27. Juli 2011 um 18:11 UTC](https://forum.shopware.com/t/sitemap-xml-und-google-50000-urls-begrenzung/3665 "2011-07-27T18:11:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamik](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kamik](https://forum.shopware.com/u/kamik)\
**Post date:** [27. Juli 2011 um 18:11 UTC](https://forum.shopware.com/t/sitemap-xml-und-google-50000-urls-begrenzung/3665/1 "2011-07-27T18:11:07Z")

</div>

Es ist bekannt, dass google nur 50000 URL in eine Datei lesen kann. Es wäre sinnvoll, wenn Shopware\_Controllers\_Frontend\_SitemapXml eine Sitemap index-file erstellt. [http://www.google.com/support/webmaster … swer=71453](http://www.google.com/support/webmasters/bin/answer.py?answer=71453)

---

<div class="post-metadata">

**Author:** ![kamik](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kamik](https://forum.shopware.com/u/kamik)\
**Post date:** [19. August 2011 um 14:56 UTC](https://forum.shopware.com/t/sitemap-xml-und-google-50000-urls-begrenzung/3665/2 "2011-08-19T14:56:24Z")

</div>

So, ich habe die Klasse Shopware\_Controllers\_Frontend\_SitemapXml erweitert, dass er über index.xml arbeiten kann. Aber funktioniert irgendwie RewriteRule nicht. Kann mir jemand helfen? `RewriteRule categories\_(.\*).xml shopware.php?controller=GoogleSitemapXml&categories&p=$1 RewriteRule articles\_(.\*).xml shopware.php?controller=GoogleSitemapXml&articles&p=$1 RewriteRule googlesitemap.xml$ shopware.php?controller=GoogleSitemapXml ` funzt einfach nicht - auch im logs keine Fehler. Die Klasse sieht so aus. Achtung - ich bin kein php-guru 🙂 s. unten

---

<div class="post-metadata">

**Author:** ![kamik](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kamik](https://forum.shopware.com/u/kamik)\
**Post date:** [19. August 2011 um 17:01 UTC](https://forum.shopware.com/t/sitemap-xml-und-google-50000-urls-begrenzung/3665/3 "2011-08-19T17:01:53Z")

</div>

in debugmode bekomme ich `[19/Aug/2011:16:56:23 +0200] [www.xxx.com/sid#7fca6df08860][rid#7fca6e8355f0/initial] (2) [perdir /var/customers/webs/xxx/shopware/] rewrite 'googlesitemap.xml' -\> 'shopware.php?controller=GoogleSitemapXml' [19/Aug/2011:16:56:23 +0200] [www.xxx.com/sid#7fca6df08860][rid#7fca6e8355f0/initial] (3) split uri=shopware.php?controller=GoogleSitemapXml -\> uri=shopware.php, args=controller=GoogleSitemapXml` also Rule wird angewendet. Aber bekomme ich nur Startseite angezeigt.

---

<div class="post-metadata">

**Author:** ![kamik](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kamik](https://forum.shopware.com/u/kamik)\
**Post date:** [22. August 2011 um 09:06 UTC](https://forum.shopware.com/t/sitemap-xml-und-google-50000-urls-begrenzung/3665/4 "2011-08-22T09:06:16Z")

</div>

hat keiner Ideen?

---

<div class="post-metadata">

**Author:** ![Heiner\_Lohaus](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@Heiner\_Lohaus](https://forum.shopware.com/u/Heiner_Lohaus)\
**Post date:** [22. August 2011 um 09:29 UTC](https://forum.shopware.com/t/sitemap-xml-und-google-50000-urls-begrenzung/3665/5 "2011-08-22T09:29:02Z")

</div>

Hi, wofür braucht ein Bot eine SEO-Url? Kannst du dort nicht einfach die standard Urls verwenden? Dann muss auch die .htaccess-Datei auch nicht angepasst werden. 😉 Beispiel: shop/google\_sitemap.xml?categories=1&p=1 shop/google\_sitemap.xml?articles=1&p=1 shop/google\_sitemap.xml Heiner

---

<div class="post-metadata">

**Author:** ![kamik](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kamik](https://forum.shopware.com/u/kamik)\
**Post date:** [22. August 2011 um 09:36 UTC](https://forum.shopware.com/t/sitemap-xml-und-google-50000-urls-begrenzung/3665/6 "2011-08-22T09:36:49Z")

</div>

Danke. Jo, so kann man machen. Aber die Frage, warum rewrite nicht funkzioniert, blebt trozdem offen. wenn ich htaccess [hier](http://htaccess.madewithlove.be/) prüfe, ist es i.O. Ich bin ratlos.

---

<div class="post-metadata">

**Author:** ![kamik](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kamik](https://forum.shopware.com/u/kamik)\
**Post date:** [22. August 2011 um 10:00 UTC](https://forum.shopware.com/t/sitemap-xml-und-google-50000-urls-begrenzung/3665/7 "2011-08-22T10:00:25Z")

</div>

[code]\<?php /\*\*

- Sitemap controller
- 
- @link [http://www.shopware.de](http://www.shopware.de)
- @copyright Copyright © 2011, shopware AG
- @author Heiner Lohaus
- @package Shopware
- @subpackage Controllers  
_/  
class Shopware\_Controllers\_Frontend\_GoogleSitemapXml extends Shopware\_Controllers\_Frontend\_SitemapXml  
{  
var $MaxUrlsCount=50000;  
/_\*
  - Index action method  
\*/  
public function indexAction()  
{  
echo „\<?xml version=\"1.0\" encoding=\"UTF-8\"?\>\r\n“; $parentId = Shopware()-\>Shop()-\>get(‚parentID‘); $CountCategoryUrls=$this-\>getCountCategoryUrls($parentId); $CountArticleUrls=$this-\>getCountArticleUrls($parentId); $CountUrls=$CountCategoryUrls+CountArticleUrls; if(isset(\_GET[‚p‘])){ indexSeite=\_GET[‚p‘]; $min = ($indexSeite-1)\*this-\\>MaxUrlsCount; echo "\<urlset xmlns='\"http://www.sitemaps.org/schemas/sitemap/0.9\"'\>\r\n"; if(isset(_GET[‚categories‘])){  
$this-\>readCategoryUrls(parentId); }elseif(isset(GET[‚articles‘])){  
$this-\>readArticleUrls($parentId,$min);  
}else{  
return;  
}  
echo „\r\n“; }else{ $this-\>CreateSitemapIndex($CountCategoryUrls,$CountArticleUrls); } } public function CreateSitemapIndex($CountCategoryUrls,$CountArticleUrls){ ob\_start(‚ob\_gzhandler‘); echo „\r\n“;  
$i = 0;  
do {  
$k=$i/$this-\>MaxUrlsCount+1;  
echo „\r\n“;  
//echo „http://“.Shopware()-\>Shop()-\>getHost()."/categories$k.xml\r\n";  
echo „http://“.Shopware()-\>Shop()-\>getHost()."/shopware.php?controller=GoogleSitemapXml&categories&p=$k\r\n";  
//echo „2004-10-01T18:23:17+00:00\r\n“;  
echo „\r\n“;  
$i=$i+$this-\>MaxUrlsCount;  
} while ($i \< $CountCategoryUrls);  
$i = 0;  
do {  
$k=$i/$this-\>MaxUrlsCount+1;  
echo „\r\n“;  
//echo „http://“.Shopware()-\>Shop()-\>getHost()."/articles_$k.xml\r\n";  
echo „http://“.Shopware()-\>Shop()-\>getHost()."/shopware.php?controller=GoogleSitemapXml&articles&p=$k\r\n";  
//echo „2004-10-01T18:23:17+00:00\r\n“;  
echo „\r\n“;  
$i=$i+$this-\>MaxUrlsCount;  
} while ($i \< $CountArticleUrls);

---

<div class="post-metadata">

**Author:** ![qwerkopf1](https://avatars.discourse-cdn.com/v4/letter/q/ccd318/32.png) [@qwerkopf1](https://forum.shopware.com/u/qwerkopf1)\
**Post date:** [1. Juli 2014 um 12:58 UTC](https://forum.shopware.com/t/sitemap-xml-und-google-50000-urls-begrenzung/3665/8 "2014-07-01T12:58:31Z")

</div>

hallo miteinander wir haben die sitemap jetzt geteilt in kategorie und artikel. die artikel-datei hat nach wie vor über 50.000 einträge. gibt es eine möglichkeit die datei zu splitten? über parameter würde ja reichen… sitemap.xml?page=1 sitemap.xml?page=2 usw
