我需要为表单的action
生成一个https URL。它应该适用于所有服务器,live,stage和localhost。为表单生成https操作url
在本地主机:localhost:port/submiturl
- 无需在这里https。
在现场:https://domain.com/submiturl
在第二阶段:https://stage.domain.com/submiturl
我不能把整个页面下的SSL,但我特别需要把形态的作用。
如何以编程方式执行此操作?
编辑:
我试过在本地主机action="@Url.Action("Action", "Controller", null, "https")"
但它产生https://localhost/Controller/Action
,这是不正确的。
@丹,你尝试过HTTPS URL重写,贴在下面? – 2014-09-30 18:54:32