Author Topic: PHP Sitemap - Skip Parameters  (Read 5533 times)

xray77

  • Newbie
  • *
  • Posts: 2
PHP Sitemap - Skip Parameters
« on: March 19, 2016, 14:34:24 PM »
Hello,

how can relative links add to $skip ?

Example, don't need in Sitemap links with parameters like

?sortby= (or some session-id's)

http://xyz.com/file.php
and also
http://xyz.com/file.php?sortby=

So I need at $skip array a relative URLs. If so, I can include parts of the url like "badwords"
Is there any placeholder possible like %:

Code: [Select]
    $skip = array (
"%?filter=&brands=",
                  );

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2440
  • a command shell is enough to do amazing things
Re: PHP Sitemap - Skip Parameters
« Reply #1 on: March 24, 2016, 07:28:27 AM »
Hello,

example for "sortby=":

in the file sitemap-1.0.php insert at line 163

Code: [Select]
     if (strpos ($next_url, "sortby=") !== false) $ignore = true;


Best regards
Elmar
« Last Edit: March 24, 2016, 07:30:01 AM by Elmar »

xray77

  • Newbie
  • *
  • Posts: 2
Re: PHP Sitemap - Skip Parameters
« Reply #2 on: March 25, 2016, 14:21:24 PM »
Thanks  ;)