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

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.
}

Posted in How-to

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

My Current Location
LastFM
Liars' Bar
The Beautiful South
Blue Is The Colour
1 day ago
The Sound Of North America
The Beautiful South
Blue Is The Colour
1 day ago
Blackbird On The Wire
The Beautiful South
Blue Is The Colour
1 day ago
Mirror
The Beautiful South
Blue Is The Colour
1 day ago
Little Blue
The Beautiful South
Blue Is The Colour
1 day ago