class PagesController < ApplicationController def show @page = Page.find_by_url('/' + params[:path].join('/')) render :file => 'public/404.html', :status => 404 unless @page end end