Disable rss.xml and replace with own feed(s)

Disable rss.xml and replace with own feed(s)

05/09/2011 12:01 1 comment

While Drupal has no way of disabling the rss-feeds by default, it is possible to override the rss-output, and tell Drupal to use another feed.

Create a new module with following code, and make sure to replace with the naming of your choice. In this blog post I assume you know how to create your own modules.


function _menu_alter(&$items) {
unset($items['rss.xml']);
}

function _init() {
drupal_add_feed(url('feed/news', array('absolute' => TRUE)), 'Website News RSS');
// You can add as many feeds as you want.
}

Leave a reply