latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Membership Options Redirect Loop After SSL

Home Forums Community Forum Membership Options Redirect Loop After SSL

This topic contains 25 replies, has 4 voices. Last updated by  Philly 4 years, 6 months ago.

Topic Author Topic
Posted: Thursday Jun 7th, 2012 at 10:33 pm #15887
Jim Climy
Username: weasel

Membership options page was created and accessed OK but when I added the SSL custom field to my membership options page but now I can’t access it publicly, I get this loop error in Chrome and Firefox. Any ideas?

Newbie testing, watch out!

This webpage has a redirect loop
The webpage at https://www.HIDDEN.com/HIDDEN-premium/?s2-ssl=yes has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Here are some suggestions:
Reload this webpage later.
Learn more about this problem.

Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.

The page isn’t redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept
cookies.

  • This topic was modified 4 years, 7 months ago by  Jim Climy.

List Of Topic Replies

Viewing 25 replies - 1 through 25 (of 25 total)
Author Replies
Author Replies
Posted: Friday Jun 8th, 2012 at 10:55 am #15933
Jim Climy
Username: weasel

I think this (the custom field) is redundant? s2member directs to a https Paypal form anyway after submission? Wait maybe not for credit card purchases, maybe only for Paypal checkouts.

  • This reply was modified 4 years, 7 months ago by  Jim Climy.
Posted: Friday Jun 8th, 2012 at 9:34 pm #16012
Raam Dev
Username: Raam
Staff Member

Hi Jim,

If you’re using s2Member Pro-Forms with PayPal Pro to accept credit cards on your site, then you should be protecting the Pro-Forms page with SSL so that credit cards submitted to PayPal are sent securely via SSL. If you’re not using PayPal Pro to accept credit cards on your site, then you don’t need to protect your page with SSL since s2Member will redirect the purchaser to a secure URL on PayPal to complete the checkout.

I suggest trying to access your Membership Options Page via SSL by manually changing the URL to https://, instead of appending the ?s2-ssl=yes to the URL. If you still have the redirect problem, try the same thing with a different (public) page on your site. Can you access any URLs on your site using SSL? If not, then it sounds like you might have a problem with the SSL configuration on your server (in which case I suggest contacting your web host).

Posted: Saturday Jun 9th, 2012 at 8:53 pm #16088
Jim Climy
Username: weasel

When I add https:// to the front of my membership options page, the page seems to lose all its css styling and comes up like unformatted html. Same is true of the homepage. I’ll contact my host if they have any ideas.

Posted: Monday Jun 11th, 2012 at 8:39 am #16128
Jim Climy
Username: weasel

OK, I think these are issues with Amazon S3/Cloudfront. The css/stylesheet seems to not resolve (when adding https manually on the site) and is being called on page load from an https. I think the redirect look is probably the same issue, my site’s ssl certificate is being seen as redundant to Amazon’s? I am in unfamiliar territory. Do I need to configure the download options for Amazon CDN even though I don’t plan to offer any downloads in the file/save-as sense (the other sense being the download of webpages for viewing like web browsers do all the time)? Or are there settings in Amazon I need to configure?

  • This reply was modified 4 years, 7 months ago by  Jim Climy.
Posted: Monday Jun 11th, 2012 at 1:08 pm #16141
Jim Climy
Username: weasel

I wonder too could this be an issue with W3 Total Cache settings?

Posted: Monday Jun 11th, 2012 at 6:44 pm #16164
Jim Climy
Username: weasel

My host tells me they gave the plugin write permissions but I dont have a -logs or -files folder in the plugins folder. How do I make sure those can be created properly?

Posted: Monday Jun 11th, 2012 at 7:19 pm #16169
Jim Climy
Username: weasel
Posted: Tuesday Jun 12th, 2012 at 11:00 am #16257
Jim Climy
Username: weasel

As I continue to try and troubleshoot this on my own since the lack of replies from support, here’s my latest confusion:

In my own language:
I already have cdn.mydomain.com CNAME directing to something.cloudfront.net. Is it possible to have
> > more than one CNAME destination? S2member added two more distros automatically from the download settings:
> > > something2.cloudfront.net
> > > something3.cloudfront.net

Can I direct my existing cdn.mydomain.com to point to all 3 cloudfront distros? My host tells me that doing so will break things?

Not sure if this will fix my redirect loop or the stylesheet problems.

Posted: Wednesday Jun 13th, 2012 at 4:27 am #16343

Hi Jim. Sorry for the delayed response.

Let me see, if you use the s2Member custom field to secure pages in a page that doesn’t load any files from your CDN, do you still get the error you mentioned first?

You may have a plugin that’s causing a conflict, it is a possibility, even the theme. A test you can do is use the default theme and reload the page to see if you get the problem. If not, try deactivating other plugins one by one, and see if check the secured page after each. I’d start with the caching plugin, so you can actually see the difference after each change in your tests.

I hope that helps. :)

Posted: Thursday Jun 14th, 2012 at 10:16 pm #16537
Jim Climy
Username: weasel

OK, I need to test this.

My site is setup with s3 and Cloudfront, prior to s2member for speed. Doesn’t that mean that the whole site loads, at least in part, via CDN? I may be confused over how it works.

Update: my stylesheet loads via the CDN so not sure how I could create any posts/pages not using the CDN….

I created a new page. Gave it title “test” and the force custom field, and same redirect loop error. I disabled the caching plugin and the redirect loop remains. Will try other plugins and theme…

  • This reply was modified 4 years, 6 months ago by  Jim Climy.
Posted: Thursday Jun 14th, 2012 at 10:45 pm #16539
Jim Climy
Username: weasel

I disabled all plugins except for s2member. Still the loop.
I switched to twentyeleven theme. Still the loop.

I was going to try to disable my cloudfront distros. But this did not seem to fix which surprised me….

Are we sure the certificate is installed correctly by my host? Even though my host told me the issue is with s2member/Amazon.

  • This reply was modified 4 years, 6 months ago by  Jim Climy.
Posted: Thursday Jun 14th, 2012 at 11:08 pm #16543
Jim Climy
Username: weasel

My developer tell me this:

“Here is the error that I received on clicking on a CDN item link.

Technical Details

cdn.mydomain.com uses an invalid security certificate.

The certificate is only valid for the following names:
*.cloudfront.net , cloudfront.net

(Error code: ssl_error_bad_cert_domain) “

Posted: Friday Jun 15th, 2012 at 8:00 am #16577

Ah, sorry I had not seen these posts before I wrote my comment on your other thread about this redirection issue with SSL.

cdn.mydomain.com uses an invalid security certificate.

The certificate is only valid for the following names:
*.cloudfront.net , cloudfront.net

I see. Can’t you use the CloudFront domain, at least in the secure pages, instead of your subdomain?

Posted: Friday Jun 15th, 2012 at 8:24 am #16582
Jim Climy
Username: weasel

I could use the CloudFront domain I guess for this page. Hmm, not sure how to do that? Would I need to upload the MYSQL database and php files to my Amazon S3 bucket? Pardon my ignorance on how that all interacts with my site. Can I mask the Amazon cloudfront url still?

  • This reply was modified 4 years, 6 months ago by  Jim Climy.
Posted: Saturday Jun 16th, 2012 at 3:39 am #16645

No, only static files go in S3, like the image files. You upload them to the bucket that has the CloudFront distribution and then use the CF URL for it, but not with your domain name.

Posted: Sunday Jun 17th, 2012 at 11:03 pm #16750
Jim Climy
Username: weasel

OK but you said ” Can’t you use the CloudFront domain, at least in the secure pages, instead of your subdomain?” – so I am confused. Don’t I need the page *itself* with my paypal pro checkout form to be https/ssl? So if I want to use the Cloudfront domain for that page, as you suggest, how do I do that? or am I totally lost?

Posted: Tuesday Jun 19th, 2012 at 5:07 am #16849

No, the CloudFront domain would only be for files served by CloudFront, that you’re using in the secure page. Your secure page is still the same, but it’s loading a resource from CloudFront, and every resource in a secure page has to be secured too. Your CF hosted files too, but you’re using a subdomain of yours for those, which doesn’t match with the certificate CF uses to serve the files securely.

Posted: Tuesday Jun 19th, 2012 at 10:15 am #16902
Jim Climy
Username: weasel

Hmm. I guess I am not sure how to configure this to make it work harmoniously? I assume I would need to somehow link to my cloudfront domain or remove the cname redirect for just this one page? I am at a a loss. Would it help if I send you the admin login as I will on the other issue?

Posted: Wednesday Jun 20th, 2012 at 6:27 am #16984

Yeah, you’d have to stop using the CNAME redirect for CloudFront in the secured page of your site.

You can also try asking Amazon support what they suggest? I don’t think you’re the first person using a CNAME for your CloudFront hosted files embedded in a secured page.

Posted: Wednesday Jun 20th, 2012 at 11:27 am #17023
Jim Climy
Username: weasel

My host tells me they can’t turn off that CNAME for one page, they said “its global”.

Here’s my back and forth with Amazon on this. Not sure if this is getting me anywhere:
https://forums.aws.amazon.com/thread.jspa?messageID=356634&#356634

Posted: Wednesday Jun 20th, 2012 at 11:33 am #17024
Jim Climy
Username: weasel

Hmm, does this mean anything? Read it a few times and trying to get my head around:
http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS

Posted: Thursday Jun 21st, 2012 at 7:29 am #17097

Alternate Domain Names (CNAMEs) and HTTPS

If you want viewers to use HTTPS to access your objects, you must use the CloudFront domain name that is assigned to your distribution in your URLs. However, you can add one or more alternate domain names to a download distribution and then:

Use HTTPS when the links to your objects use the CloudFront domain name, for example, https://d111111abcdef8.cloudfront.net/image.jpg.

Use alternate domain names when the links to your objects use HTTP, for example, http://www.example.com/image/image.jpg.

If you want to use both alternate domain names and HTTPS in the same CloudFront download distribution (but not for the same objects), you must create at least one cache behavior for which the value of Viewer Protocol Policy is HTTP and HTTPS (allow-all if you’re using the CloudFront API).

Yeah, the last paragraph is the one telling you what to do, but I’m not familiar with CF to know what it’s actually saying. I don’t know what “cache behavior” is in Amazon. You should google it or ask their support team to guide you, I guess.

Posted: Thursday Jun 21st, 2012 at 9:05 am #17124
Jim Climy
Username: weasel

So I do have the “HTTP and HTTPS” in my only distribution, so there must be some other steps I need to take?

Posted: Friday Jun 29th, 2012 at 12:21 pm #17864
Jim Climy
Username: weasel

Does v120622 possibly fix this?

Posted: Friday Jun 29th, 2012 at 6:09 pm #17891

HI Jim,

Is there anything on s2member’s side that needs to be fixed?

You cannot use your own CNAME’s because any CNAME you use will not be secure and will generate mixed content warnings and such.

You must link all your static content via https://yourdistro.cloudfront.net not cdn.yoursite.com
So your settings in total cache should point to there.
That should solve the issue when trying to load your stylesheets when using the https:// prefix.

Also with regards to total cache, make sure you’re not caching and or serving s2members javascript file that is dynamic.

Are you using push or pull orgin in your cdn settings for total cache?

I think the problems your having are to do with your CNAME setup and maybe DNS?.

I saw this statement in another of your posts

I have a subdomain with cname redirect to my cloudfront/s3. My s3 bucket contains portions of wp-content and wp-includes.

Can you explain more in detail how your site is setup and how your using CNAME’s

How many CNAME’s are you using and what and where are they redirecting to?

How are you enforcing the CNAME’s? via plugins, your web host DNS manager or both?

When I add https:// to the front of my membership options page, the page seems to lose all its css styling and comes up like unformatted html. Same is true of the homepage. I’ll contact my host if they have any ideas.

So the redirect problem is solved if you use https:// rather than append ?s2-ssl=yes is that right?

That suggests to me that all your problems are caused by your use of cdn.yoursite.com

Viewing 25 replies - 1 through 25 (of 25 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.