fix not found error when spiders were hitting with .php

This commit is contained in:
Sam 2013-04-18 09:55:47 +10:00
parent cb8f3f1a6f
commit 6974ad487c
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class ApplicationController < ActionController::Base
end
rescue_from Discourse::NotFound do
if request.format.html?
if !request.format || request.format.html?
# for now do a simple remap, we may look at cleaner ways of doing the render
raise ActiveRecord::RecordNotFound
else