0

I recently moved my site (hosted on OpenShift) from HTTP to HTTPS. The domain name is registered at GoDaddy, but I use the DNS of Cloudflare. I had implemented a Cloudflare page rule to forward www to non-www. All was working fine.

I have now implemented HTTPS and the forwarding from www to non-www does not work anymore. It forwards to https://www.example.com/app instead of https://example.com and I get a 404 Not Found.

The current page rule on cloudflare is:

enter image description here

What am I doing wrong? Thanks!

  • The "app" has to come from somewhere in your configuration. Interestingly it only happens for the home page. Deep pages seem to redirect fine when I tested them. (eg: curl -s --head http://www.ligatures.net/a.html) – Stephen Ostermiller Sep 17 '14 at 13:54
  • Is there any way you can post the contents of your .htaccess also, along with the name of the CMS you use if applicable. – eyoung100 Sep 17 '14 at 13:55
  • I am using Openshift. I have set an alias from ligatures.net → ligatures-dawningstreams.rhcloud.com. It is a node.js application. I don't have access to .htaccess (if ever it is used). I have notified the question on Openshift's IRC. – Jérôme Verstrynge Sep 17 '14 at 14:00
2

# curl -IL http://www.ligatures.net/a.html -v * Connection #0 to host www.ligatures.net left intact * Issue another request to this URL: 'https://www.ligatures.net/a.html' * Found bundle for host www.ligatures.net: 0x14103c0 * Adding handle: conn: 0x1410930 * Adding handle: send: 0 * Adding handle: recv: 0 * Curl_addHandleToPipeline: length: 1 * - Conn 0 (0x140f9c0) send_pipe: 0, recv_pipe: 0 * - Conn 1 (0x1410930) send_pipe: 1, recv_pipe: 0 * About to connect() to www.ligatures.net port 443 (#1) * Trying 54.80.18.246... * Connected to www.ligatures.net (54.80.18.246) port 443 (#1) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * Server certificate: * subject: CN=*.rhcloud.com,OU=RHC Cloud Opoerations,O=Red Hat Inc,L=Raleigh,ST=North Carolina,C=US,serialNumber=LnhzJHxcX0bIdlH2ITnDgaewey8ce5g3 * start date: Feb 02 19:15:37 2013 GMT * expire date: May 08 01:49:13 2015 GMT * common name: *.rhcloud.com * issuer: CN=GeoTrust SSL CA,O="GeoTrust, Inc.",C=US * NSS error -12276 (SSL_ERROR_BAD_CERT_DOMAIN) * Unable to communicate securely with peer: requested domain name does not match the server's certificate. * Closing connection 1 curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate

You would need to following: https://access.redhat.com/documentation/en-US/OpenShift_Online/2.0/html-single/User_Guide/index.html#sect-Custom_Domains_and_SSL_Certificates to get your ssl and domain setup correctly.

0

It could just be a misconfigured .htaccess file. If you don't have an .htaccess file that could be it, too. Check it to see if there is any forwarding rules in there, and change it from http to https if there are.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.