Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Jun 2005
    Posts
    103

    Default Redirect from https to http problems

    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
    Frank Coetzee
    SA Internet News Group cc


    "I hear and I forget, I see and I remember. I do and I understand. " - Chinese Proverb

  2. #2
    Member InterServed's Avatar
    Join Date
    Jul 2007
    Posts
    172
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Redirect from https to http problems

    .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]
    InterServed Tehnologies.
    Affordable web hosting

  3. #3
    Member
    Join Date
    Jun 2005
    Posts
    103

    Default Re: Redirect from https to http problems

    https://online-billing.co.za/

    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.
    Frank Coetzee
    SA Internet News Group cc


    "I hear and I forget, I see and I remember. I do and I understand. " - Chinese Proverb

  4. #4
    Member InterServed's Avatar
    Join Date
    Jul 2007
    Posts
    172
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Redirect from https to http problems

    Quote Originally Posted by Frankc View Post
    https://online-billing.co.za/

    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.
    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.
    InterServed Tehnologies.
    Affordable web hosting

  5. #5
    Member
    Join Date
    Jun 2005
    Posts
    103

    Default Re: Redirect from https to http problems

    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)
    Frank Coetzee
    SA Internet News Group cc


    "I hear and I forget, I see and I remember. I do and I understand. " - Chinese Proverb

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2004
    Posts
    313
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default Re: Redirect from https to http problems

    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.
    NDCHost (ProVPS): Xen VPS / Dedicated / Co-Location
    Contact us for your cPanel Licensing needs! We price match, provide better support, and take care of our customers!

  7. #7
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Redirect from https to http problems

    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.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  8. #8
    Member
    Join Date
    Mar 2006
    Location
    UK
    Posts
    12

    Default Re: Redirect from https to http problems

    Quote Originally Posted by cPanelTristan View Post
    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.
    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. #9
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Redirect from https to http problems

    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.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. Redirect https to http for non-ssl enabled domains
    By rkula in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-21-2011, 02:23 PM
  2. redirect from https to http
    By apfan in forum New User Questions
    Replies: 2
    Last Post: 03-23-2006, 05:58 PM
  3. Redirect Http to Https
    By billau in forum cPanel and WHM Discussions
    Replies: 16
    Last Post: 10-26-2004, 09:12 PM
  4. Redirect http to https://
    By internethosting in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-08-2003, 03:55 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube