# How to set '302 Moved' location protocol

**URL:** <https://www.ruby-forum.com/t/how-to-set-302-moved-location-protocol/88357>\
**Category:** Deployment\
**Created:** [March 9, 2007, 11:46pm UTC](https://www.ruby-forum.com/t/how-to-set-302-moved-location-protocol/88357 "2007-03-09T23:46:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [March 9, 2007, 11:46pm UTC](https://www.ruby-forum.com/t/how-to-set-302-moved-location-protocol/88357/1 "2007-03-09T23:46:27Z")

</div>

Same problem, but hopefully a clearer call for help 😉

I need to set the protocol part of the Location: in the ‘302 Moved’  
header to ‘https:’. I can see in Live HTTP Headers that it’s currently  
set to ‘http:’. This is causing warning dialogs (‘you’re being  
redirected to an unsecured page’) under SSL for all my controller to  
controller redirect\_to’s. Is this something I can set in Rails? Or is  
it something that gets set somewhere else (like Apache, maybe?).

Thanks much for any help!!!

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [March 10, 2007, 12:29am UTC](https://www.ruby-forum.com/t/how-to-set-302-moved-location-protocol/88357/2 "2007-03-10T00:29:31Z")

</div>

On 3/9/07, Bill W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks much for any help!!!
> 
> Best regards,  
> Bill

There are a ton of discussions already on this – this was at the top  
of google’s list:

[http://blog.duncandavidson.com/2006/01/reverse\_proxyin.html](http://blog.duncandavidson.com/2006/01/reverse_proxyin.html)  
also  
[http://dev.rubyonrails.org/ticket/5346](http://dev.rubyonrails.org/ticket/5346)

- Rob

---

<div class="post-metadata">

**Author:** ![wpwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d6d6ee/32.png) [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Post date:** [March 10, 2007, 1:51am UTC](https://www.ruby-forum.com/t/how-to-set-302-moved-location-protocol/88357/3 "2007-03-10T01:51:37Z")

</div>

Hi Rob,

First, thank you very much for your reply. I really appreciate it and,  
after taking a quick look at the first link, am feeling pretty sure  
it’ll  
help me figure out what I need to do. Second thing is, I have no idea  
wtf a  
‘reverse proxy’ is. Which is why I’m so very thankful to Robby for  
setting  
this list up to begin with.

Thanks again for your reply. At least now I have something to Google on.  
Damn tough to find an answer when you can’t even form a good question  
😉

Best regards,  
Bill
