The book shows to do a catch-all route at the bottom of the route
file.  map.connect '*path', :controller => 'foo'.  The *path will put
the values in an array 'path'.

On Jan 25, 11:09 am, Cs Webgrl <li...@ruby-forum.com> wrote:
> Hi.
>
> I've got a user who wants url's to look like 
> this:www.domain.com/firstname-lastname.
>
> Right now I have a route set up like this
> map.user ':user', :controller => 'user', :action => 'show'
>
> This causes problems when I get robots and people searching for urls
> that don't map to an existing user.  So I want to put in something that
> will catch the 404's, log them in a database and route the searcher to
> an appropriate page.
>
> Is this something where I should change the route code or put in a
> redirect inside of my user controller if the user is not found?
>
> Any help on either how to do either of these 2 or other options would be
> greatly appreciated.
>
> As a note, I am following the Adv Rails Recipes 404 code, but it's not
> quite working based on my current needs.
>
> THANKS!
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to