Added new method for redirect url and rspec test