adding drupal feed redirect
parent
814e089551
commit
584ae65dc6
|
@ -5,8 +5,9 @@ class Node < Application
|
||||||
|
|
||||||
def show
|
def show
|
||||||
page = Page.find_by_nid(params[:id])
|
page = Page.find_by_nid(params[:id])
|
||||||
raise NotFound unless page
|
raise NotFound unless page or params[:id] == 'feed'
|
||||||
purl = url(:page, :id => page.name.gsub(/ /, '_'))
|
purl = url(:page, :id => page.name.gsub(/ /, '_')) rescue ''
|
||||||
|
purl = url(:controller => :feeds, :action => :rss, :format => :xml) if params[:id] == 'feed'
|
||||||
Merb.logger.info("Permenant Redirect Drupal Node to #{purl}")
|
Merb.logger.info("Permenant Redirect Drupal Node to #{purl}")
|
||||||
self.status = 301
|
self.status = 301
|
||||||
headers['Location'] = purl
|
headers['Location'] = purl
|
||||||
|
|
Reference in New Issue