Jump to content

sitemap question


guest*

Recommended Posts

  • 3 weeks later...

Nobody knows ?

I don't htink that it is correct to find on presta sitemap these links, but these are also created when you use sitemap generator on BO:

404.php
best-sales.php
contact-form.php
index.php
manufacturer.php
new-products.php
phpinfo.php
prices-drop.php
process-request.php
quantity_update.php
sitemap.php
supplier.php

How can I uninclude these ? With robots.txt, or what shall I do ?

Link to comment
Share on other sites

I'm using PrestaShop v1.3.3 and my sitemap.xml file only has authentication.php, best-sales.php, category.php, contact-form.php, discount.php, index.php, manufacturer.php, new-products.php, prices-drop.php, supplier.php and my CMS pages. It doesn't have any other PHP or JS files. If yours has JS files, then something is very wrong. You can try installing the gsitemap module from the latest version of PrestaShop and see if that helps. If not, then I guess you will have to modify the module to exclude those files.

Link to comment
Share on other sites

No I don't. I don't know any other software which indexes .php-files in the sitemap. This could be also a security risk because Hacker scan such files on Search engines and try to hack them. There should be only: products and cms pages and nothing else...

Link to comment
Share on other sites

Of course, the product and CMS pages are also PHP files, but the URL is rewritten so it isn't obvious. PrestaShop v1.4 has improved the URL rewriting so all the PHP files are rewritten. For example, contact-form.php is rewritten as /lang-en/contact-us in PrestaShop v1.4. Would you feel better about those pages being in the sitemap then? In PrestaShop v1.3.2, you can edit modules/gsitemap/gsitemap.php to remove those pages from the generator:

$pages = array('authentication', 'best-sales', 'category', 'contact-form', 'discount', 'index', 'manufacturer', 'new-products', 'prices-drop', 'supplier');



Change it to:

$pages = array(/*'authentication', 'best-sales', 'category', 'contact-form', 'discount', 'index', 'manufacturer', 'new-products', 'prices-drop', 'supplier'*/);




This will remove all php files (except products and CMS pages) from the sitemap.

Link to comment
Share on other sites

Hi Rocky,

thxs. I updated to 1.3.3 and I will change the code. While I was verifying the sitemap I encountered some other problems:

(- many of my products presta cannot form automatically the friendly urls. All products where imported - I reported this as a bug... - on work on bug tracker)

- no tag-pages are in the sitemap

- no manufactuer are in the sitemap (I don't mean this: manufacturer.php, I mean each manufucturer with his own products on a sole page)

Why is it so ? Are new added features not inculded there ? If not I will keep my manufacturer-categories which are forming this too... and link the tags on product description for a better SEO.

Link to comment
Share on other sites

  • 1 month later...
Of course, the product and CMS pages are also PHP files, but the URL is rewritten so it isn't obvious. PrestaShop v1.4 has improved the URL rewriting so all the PHP files are rewritten. For example, contact-form.php is rewritten as /lang-en/contact-us in PrestaShop v1.4. Would you feel better about those pages being in the sitemap then? In PrestaShop v1.3.2, you can edit modules/gsitemap/gsitemap.php to remove those pages from the generator:

$pages = array('authentication', 'best-sales', 'category', 'contact-form', 'discount', 'index', 'manufacturer', 'new-products', 'prices-drop', 'supplier');



Change it to:

$pages = array(/*'authentication', 'best-sales', 'category', 'contact-form', 'discount', 'index', 'manufacturer', 'new-products', 'prices-drop', 'supplier'*/);




This will remove all php files (except products and CMS pages) from the sitemap.



Hi Rocky,

I opened the file in question, but cannot find any mentioned code. Where should the $pages = array be ? Arround which line ? I tried by text search and nothing matching found in there.
Link to comment
Share on other sites

I just checked and it's on line 127 of modules/gsitemap/gsitemap.php in PrestaShop v1.3.2:

$pages = array('authentication', 'best-sales', 'category', 'contact-form', 'discount', 'index', 'manufacturer', 'new-products', 'prices-drop', 'search', 'supplier');



Is the German edition different?

Link to comment
Share on other sites

About the content you are right, but it's not only to search. The module tag-block also uses the search.php. Unfortunately this module, which is a good idea to get more content, would be than superfluos. I don'tn understand why presta does not expand or carry forward this good thing.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...