# Form\_tag: post to https

**URL:** <https://www.ruby-forum.com/t/form-tag-post-to-https/70577>\
**Category:** Rails\
**Created:** [September 30, 2006, 11:09am UTC](https://www.ruby-forum.com/t/form-tag-post-to-https/70577 "2006-09-30T11:09:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [September 30, 2006, 11:09am UTC](https://www.ruby-forum.com/t/form-tag-post-to-https/70577/1 "2006-09-30T11:09:59Z")

</div>

Hello,

Which parameters should I pass to form\_tag to force it to post to https?  
I tried this:  
form\_tag {:action =\> ‘someaction’, :protocol =\> ‘https’}  
But it gave just the action URL, not https. I don’t get an error and  
looking  
at the code from url\_for does not help me either, :protocol seems to be  
the  
right parameter to pass?

Regards,  
Bart

---

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [September 30, 2006, 1:00pm UTC](https://www.ruby-forum.com/t/form-tag-post-to-https/70577/2 "2006-09-30T13:00:07Z")

</div>

Bart B. wrote:

> Which parameters should I pass to form\_tag to force it to post to https?  
> I tried this:  
> form\_tag {:action =\> ‘someaction’, :protocol =\> ‘https’}  
> But it gave just the action URL, not https. I don’t get an error and looking  
> at the code from url\_for does not help me either, :protocol seems to be the  
> right parameter to pass?

Add :only\_path =\> false.

–  
We develop, watch us RoR, in numbers too big to ignore.
