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?
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?
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.