Change of controller name and SEO issue

Hi,

I developed an app with cetain controller names. Now that the app is
catching up I’m trying to change the controller names to be better
aligned
with the business.

This is what I have now.

http://localhost/foo/method1
http://localhost/foo/method2
http://localhost/foo/method2/a
http://localhost/foo/method2/a/b
http://localhost/foo/method2/a/b/c
http://localhost/foo/method3

I would like to have that changed to

http://localhost/bar/method1
http://localhost/bar/method2
http://localhost/bar/method2/a
http://localhost/bar/method2/a/b
http://localhost/bar/method2/a/b/c
http://localhost/bar/method3

  1. I was thinking of having a redirect_to which would replace the
    incoming
    request url from ‘foo’ to ‘bar’ and would ask the browser to send the
    request again with bar. All the news links will have bar. This is just
    to
    take care of the people who have bookmarked foo and also for the search
    engine links. Any better way of handling this issue.

  2. I was wondering if it’s possible to tell search engine 'Hey the page
    has
    moved from url ‘a’ to url ‘b’ and you should update your database with
    url
    ‘b’. If it’s possible then I don’t have to worry about the backward
    compatible code say in a year from now.

Thanks

I developed an app with cetain controller names. Now that the app is
catching up I’m trying to change the controller names to be better aligned
with the business.

This is what I have now.

http://localhost/foo/method1

  1. I was wondering if it’s possible to tell search engine 'Hey the page has
    moved from url ‘a’ to url ‘b’ and you should update your database with url
    ‘b’. If it’s possible then I don’t have to worry about the backward
    compatible code say in a year from now.

Why not simply send a 301 redirect from /foo → /bar in your webserver
config? That would work for both users and search engines.