Plugin

Archived
Forum
(read-only)

Rein de Vries does not actively monitor this forum
(but you can still get help from other EE users).


For official support, visit the official support site »

Google Sitemap Lite

ExpressionEngine 2, ExpressionEngine 3

Back to this add-on's main page
View Other Add-ons From Rein de Vries

     

You must be logged in to post.

preventing external links in Google sitemap XML

General

gerlag
gerlag

My site uses some extral links, which is not allowed in the google sitemap
I’m using navee, to prevent that my external links are listed I added a minor tweak around line 394:

//format array
    
if (strpos($val['link'],"/")==0)// add local links only to sitemap 
     
$this->site_map[] = array(
      
'loc' => $this->_loc_escapes($val['link']),
      
'lastmod' => date('Y-m-d'),
      
'changefreq' => $this->changefreq,
      
'priority' => $this->prio
     
); 
    

This is for navee only, but I guess that the same trick can be used for the Structure/Taxonomy modules

Reinos
# 1
Developer
Reinos

Thanks for sharing. Can you create a pull request on the Github project.

Thanks, Rein