On Fri, Jan 28, 2011 at 9:49 AM, Owain
<owain.mcguire-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> .
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.