jhsachs Posted March 23, 2012 Share Posted March 23, 2012 The problem: when the site loads a page using HTTPS, the new page is loaded but $_POST is empty. I figured out how to fix it, but I'm posting for two reasons. First, to ask for insight into why the problem happened. Second, to help anyone who encounters the same problem. I first tested the site with a temporary URL provided by the hosting service. This had the form servername.hostname.com/~accountname. For this test I used a self-signed certificate which covered servername.hostname.com. Everything worked. Then I assigned the site its own domain name, created a certificate for www.owndomain.com, and tested again. That is when the problem occurred. The cause: I was generating the URL of the HTTPS page without a server name; that is, in the form https://owndomain.com instead of https://www.owndomain.com. I have a rewrite rule that rewrites owndomain.com to www.owndomain.com, and I suspect that has something to do with the problem. I believe a rewrite rule must explicitly incorporate parameters into the rewritten URL if it wants them, but since I'm using POST, not GET, I shouldn't have to do that (and can't). More experienced developers, please: any insights into what happened? Quote Link to comment https://forums.phpfreaks.com/topic/259561-loading-a-page-with-https-makes-_post-come-up-empty/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.