Route mapping?

Hi,
I am very new to Ruby on Rails. I am going through some books as
reference. When I was running my app I mistaken place a letter like:
localhost:3000/s and as there was no matching for s in my route.rb I
get this error:
Routing Error

No route matches “/s” with {:method=>:get}

So, my question is that; is there any way or exception to handle such
condition?

Any idea regarding this?

yes but be careful, if search engines recieve status 200 for something
in
you site that does not exist it will be indexed falsely as some thing
that
exist in you page, so you have to return the correct status.

imagine this:

a search engine looks for some old content in your page, instead of
receiving a not found message it will receive a 200 ok status by default
is
you have a catch all route that says something like “oppsss not found”,
it
works for a human but search engines will receive an ok and will never
remove the old content from the cache.

see how is done here.

remenber to return the correct status with the redirect

It works. Thanks a lot. That’s what I was looking for.

On Thu, Dec 9, 2010 at 9:12 PM, radhames brito [email protected]
wrote:

yes but be careful, if search engines recieve status 200 for something in
you site that does not exist it will be indexed falsely as some thing that
exist in you page, so you have to return the correct status.

imagine this:

a search engine looks for some old content in your page, instead of
receiving a not found message it will receive a 200 ok status by default
is

You received this message because you are subscribed to the Google G.
“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][email protected]
.