You need to sign in to do that
Don't have an account?
Thai Huynh
Forcing SSL
Is there an easy way to always force Force.com Site to always default to HTTPS without any client side redirect. In the Apache world, you could simply do this using htaccess. Is there something similar?
Thanks
Hello Thai,
For the page there is one attribute i.e "ForceSSl" please make it as a true. and make sure you need to use HTTPS in URL when you are testing your functionality.
If it helps please mark as solve so it will help other's also
Thanks
Nik's
Skype Name = niket.chandane
forceSSL is not an attribute of a VF page. It's part of an apex:form tag. We're not submitting any forms but simply want to redirect users to https without any javascript redirection.
That can be done via redirecting in the Construction it self. You can check the Base URL in the action method on page load.
If it's Http then you can get the currect URL and directly redirect to the HTTP://current URL
Correct. I know that way of doing it. However, the entire site is using nice URL and SF unfortunately doesn't provide you with the actual path. For instance, the url /tag/billing becomes /apex/Portal?tag=billing using the method URL.getCurrentRequestUrl().toExternalForm()
. What I ended up doing is manually map each URL to its nice URL.