Remove URL from sitemap

I have a 2 level menu but for my uniform there’s a problem to remove 1 URL from the sitemap.

I have an Ajax Uniform. I have a folder

Problem here, this URL is included in my sitemap.
When I put it in the ignore array, it do nothing.
How can I remove this URL?


$ignore = array('sitemap', 'error', 'maintenance', 'send');

// Send the right header
header('Content-type: text/xml; charset="utf-8"');

// Echo the doctype
echo '<?xml version="1.0" encoding="utf-8"?>';

<urlset xmlns="">
	<?php foreach($pages->index() as $p): ?>
	<?php if(in_array($p->uri(), $ignore)) continue ?>
		<loc><?php echo html($p->url()) ?></loc>
		<lastmod><?php echo $p->modified('c') ?></lastmod>
		<priority><?php echo ($p->isHomePage()) ? 1 : number_format(0.5/$p->depth(), 1) ?></priority>
	<?php endforeach ?>

You have to put the URI of the page into the $ignore array.

It is already in the $ingore array. Like you see ‘send’, but it do noting. It is still in the sitemap.

$ignore = array('sitemap', 'error', 'maintenance', 'send');

send is the UID, the URI is contact/commands/send.

Since send is probably not a real page, you could use a router instead; then you don’t have to exclude it from the sitemap.