Vince W. wrote:> It looks like my lighttpd server crashed yesterday. The only thing I
> found of interest is that the last request in my production log was from
> somebody looking for a URL that doesn''t exist in my app. I should
> probably fix it with routes, right? Can somebody help me understand how
> to route all 404 errors back to the index page?
>
> Also, where should I put a rescue for ''Recognition failed for
> "/comment.php"'' type errors?
>
> Thanks..
In a similar thread here I found:
map.connect ''*path'', :controller =>
''welcome'', :action => ''bad_route''
Place that as the last route. This way a routing error will never
happen. Instead, any unrouted action gets sent to a real
controller/action. Also you should add a:
render(:status => 404)
to the action to preserve the proper headers.
--
Posted via http://www.ruby-forum.com/.