The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect from https to http problems

Discussion in 'General Discussion' started by Frankc, Jun 24, 2011.

  1. Frankc

    Frankc Well-Known Member

    Joined:
    Jun 18, 2005
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    16
    1) Site ssl certificate was cancelled
    2) Links all over web points to https

    a) htaccess rewrite rules don't seems to work

    Can anyone perhaps help please?

    Searched for hours but most redirect from http to https and I can also not found a solution for the problem where the original port 443 can be changed to port 80
     
  2. InterServed

    InterServed Well-Known Member

    Joined:
    Jul 10, 2007
    Messages:
    255
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    DataCenter Provider
    .htaccess , hope this is what you are looking for , and that it also works

    Code:
    Options +FollowSymlinks
    RewriteEngine on
    RewriteCond %{SERVER_PORT} ^443$
    RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]
     
  3. Frankc

    Frankc Well-Known Member

    Joined:
    Jun 18, 2005
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    16
    Secure Connection Failed

    An error occurred during a connection to online-billing.co.za.

    SSL received a record that exceeded the maximum permissible length.

    (Error code: ssl_error_rx_record_too_long)

    Seems that even while the link redirect to http the connection is still ssl (port 443) and thus give this error.
     
    #3 Frankc, Jun 24, 2011
    Last edited by a moderator: Apr 21, 2015
  4. InterServed

    InterServed Well-Known Member

    Joined:
    Jul 10, 2007
    Messages:
    255
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    DataCenter Provider
    That could be related to a bad SSL Certificate installment. I still don't understand why do you try to redirect a secure connection to a non-secure while you could simple uninstall the certificate , in that case there will be no binding on ssl port 443 on your domain.
     
    #4 InterServed, Jun 24, 2011
    Last edited by a moderator: Apr 21, 2015
  5. Frankc

    Frankc Well-Known Member

    Joined:
    Jun 18, 2005
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    16
    There was a certificate installed but removed from the server. Everything works fine but I forgot about the large number of https links at many different websites so ???? (Thank you for your replies so far)
     
  6. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Unfortunately with the way that HTTPS works, you can't redirect HTTPS->HTTP without some sort of issue in this case. The SSL negotiation and connection is established first before any htaccess or even vhost redirects can happen. In the case that there is no SSL vhost on that IP (not listening on 443), an error will be seen like the one Frankc posted. If one is using a server-wide or self-generated cert, the usual "Certificate cannot be trusted" warning screen will be seen. In this latter case, once the certificate is accepted and the HTTPS connection fully established, then any vhost- or htaccess-level redirects will happen.

    Realistically the only way to work around this problem is to purchase a (cheap) signed SSL cert for the domain so the redirection can happen without any interaction from the end-user.
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Otherwise, do a search on your files for all entries that have https and change them back to http. It would have been better to instead using the relative path to files without hard coding http or https in any of the files.
     
  8. globule

    globule Member

    Joined:
    Mar 20, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    The problem is that other sites link to his HTTPS URLs so a search and replace on his own site isn't going to help that.

    Just buy a cheap SSL cert and job done.
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    The coding would still be advisable to be changed to use relative paths rather than absolute urls. It is not sound coding practice to use absolute urls with http or https in them. In my opinion, I would suggest to get this corrected now that the issue is known.
     
Loading...

Share This Page