AJAX redirect, with absolute URL, corrupts the URL

I'm trying to redirect the browser to a URL outside of my domain on
some AJAX calls.
I do:

page.redirect_to(some_url)

It works fine with internal URLs, when I supply the :action
and :controller, but absolute URLs fail. Rails insists on applying
HTML encoding to the URL, thus replacing the & signs between arguments
to &

* Same thing happens if I do the redirect from the .rjs template or
from the controller.

Do I need to do something else to get this working?

Thanks,
Amir

helzer wrote:

page.redirect_to(some_url)

It works fine with internal URLs, when I supply the :action
and :controller, but absolute URLs fail. Rails insists on applying
HTML encoding to the URL, thus replacing the & signs between arguments
to &

That might be an insect. Try more raw JavaScript:

page << "window.location.href = '#{my_uri}';"

Thanks Phlip,

That works great.

Amir