I want to make a rewrite to another domain so that http://domain1.com/abc would point to http://domain2.com/xyz. This is my code:
require 'rack/rewrite'
config.middleware.insert_before(Rack::Lock, Rack::Rewrite) do
rewrite '/abc', 'http://domain2.com/xyz'
end
But after I open http://domain1.com/abc, Im being pointed to http://domain1.com/http:/domain2.com/xyz . How could I rewrite it so that it would point to the right place?