On Fri, Jan 28, 2011 at 9:49 AM, Owain <[email protected]> wrote:
> 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? > > 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 > 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. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

