0

How can I redirect my home root to an external url? I have a backend website and I want to redirect index to another website (and on another domain).

I'm using Rails 4:

root to: redirect('http:XXXX')

works?

Roberto Pezzali
  • 2,484
  • 2
  • 27
  • 56

2 Answers2

1

The following line will redirect to an external URL.

root to: redirect("http://www.stackoverflow.com/")
Arslan Ali
  • 17,418
  • 8
  • 58
  • 76
0

Your code should work make sure you enter the external URL properly.

WhyEnBe
  • 295
  • 7
  • 22