Webbots and Rails Technique

My application (2.3.8) has been live for some time now and I have been
getting it indexed by Google and some other bots. These bots are
throwing exceptions in the application when they perform a GET request
on some of my controllers with no params, particularly with Ajax
requests and Auto_complete.

I have sorted these out with using validate for certain applications
at the controller level.

e.g. verify :params => “promotion”, :redirect_to => ‘/’ # BTW is
there a better way of specifying root?

This seems to work but how do others handle this and what sort of
redirect makes sense for SEO? Perhaps shutting this off at the routes
level? Any other ideas?

O.

On Fri, Jan 28, 2011 at 9:49 AM, Owain [email protected] wrote:

there a better way of specifying root?

You could specify the root in your routes

root :to => ‘home_controller#main’

and then use root_path instead of ‘/’

verify :params => “promotion”, :redirect_to => root_path