Rails 3: Redirecting only specific users to new application while others should be able to access old application

My employer got new website and wants me to redirect old website(in Rails 3) users to new website whenever customers try to access old website . Tricky part is that they want their internal staff to continue to access old website with same URL. But when outside customer comes on old website, they want to redirect him/her to new website.

Is this possible?

What I can think of adding “staff” keyword at end of URL, if incoming URL in application controller has “staff” keyword then I can allow internal staff to access old website. If incoming URL does not have “staff” keyword in URL, then i can redirect to new website.

Does this make sense?

Any help would be appreciated.

Is it different url for old and new site? Also are you using devise for authentication?

hello :slight_smile:
you can set a specific date and create an helper to determine if user.where(“created_at > ?”, specific_date) and redirect to the correct version you want