# Redirect\_to :host Security Error

**URL:** <https://www.ruby-forum.com/t/redirect-to-host-security-error/121555>\
**Category:** Rails\
**Created:** [November 28, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/redirect-to-host-security-error/121555 "2007-11-28T22:08:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonlog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/db5fbb/32.png) [@jonlog](https://www.ruby-forum.com/u/jonlog)\
**Post date:** [November 28, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/redirect-to-host-security-error/121555/1 "2007-11-28T22:08:20Z")

</div>

I’m using the redirect\_to method with a :host parameter to change  
subdomains in a few places in my app, in one place it redirects to the  
url with the correct subdomain perfectly but in the current instance  
rails spits out:

You are being redirected.

and firebug catches the error:

uncaught exception: Security Error: Content at {url} may not load data  
from {url with different subdomain}.

I haven’t been able to find much information about this. Why would  
redirect\_to( :host =\> etc…) work in some areas but not here? Would it  
have something to do with a user being ‘logged in’? What direction  
should I go to investigate a solution this problem?

Thanks

-jon
