404 errors

14 views
Skip to first unread message

Fernando Aleman

unread,
Apr 4, 2014, 5:46:40 PM4/4/14
to refine...@googlegroups.com
Is it possible to get all 404 errors to display the /home/page_not_found page that is created in the admin section? I find that some 404 errors go to it, but other 404 errors go to the public/404.html page. Would I have to modify error_404?

Thanks in advance!

--
Fernando Aleman

Philip Arndt

unread,
Apr 5, 2014, 4:07:46 PM4/5/14
to refine...@googlegroups.com
All 404 errors handled by Refinery's routing should go to /home/page_not_found.  Which cases are not?

Fernando Aleman

unread,
Apr 5, 2014, 4:19:47 PM4/5/14
to refine...@googlegroups.com
In both my current Refinery install or if I install a fresh install of Refinery, once I start it up, if I go to http://localhost:3000/abc I get the /home/page_not_found correctly. However, if I go to http://localhost:3000/123 (or any other numbers) I get:

Is there any way to change it so that if numbers are entered in the url, it also gets the /home/page_not_found page?

Philip Arndt

unread,
Apr 5, 2014, 4:34:40 PM4/5/14
to refine...@googlegroups.com
I see what you mean.  This is absolutely correct functionality in development mode where you get a 404 for a friendly path but an ActiveRecord not found if you pass an ID.  If you run the application in production mode you'll see that it goes to the 404 for both cases. 

Is that okay?

Fernando Aleman

unread,
Apr 5, 2014, 4:45:50 PM4/5/14
to refine...@googlegroups.com
Wow, thanks Philip. This is exactly what I was looking for. I really appreciate the help. :D

Philip Arndt

unread,
Apr 5, 2014, 4:46:12 PM4/5/14
to refine...@googlegroups.com
No problem! :)
Reply all
Reply to author
Forward
0 new messages