Home Communication board WiKi Get Quote

How to exclude pages from Google sitemap in DokuWiki

You should look into the <dokuwiki dir>lib/exe/indexer.php file. Here you will find the runSitemapper function. The best place to exclude pages from the Google sitemap will be the following cycle:

    foreach($pages as $id){
        $id = trim($id);
        if (preg_match('/^prohibited/u', $id)) continue;

In this code all of the URLs that start with “prohibited” will be excluded from the Google sitemap.

 
Home About us Privacy statement Terms & Conditions Refund policy © 2007–2024 ArsCommunity