I am currently running a website on a shared server (Hostgator). The site does not have an SSL certificate and doesn't really need it since it is just informational.

However, I've noted that a few people have erroneously tried to connect using SSL (https://www.mysite.com). I'm guessing that they replaced sections of the url in their browser window.

Currently, instead of redirecting to the non-SSL version, I get an SSL Connection Error (Error 107) page. I'm assuming because the connection over the port was refused.

I thought I could just redirect using mod_rewrite so I have tried the following in my .htaccess file but it doesn't seem to have an affect:

RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Does this rule not do what I think? Or is this not even possible because the error occurs before mod_rewrite is executed (maybe because the port for SSL is blocked)?

1 Answer 1


the error occurs before mod_rewrite is executed

The error even occurs before Apache knows that someone wants to make contact to it...

If you want to answer on that port then you are forced to get something running that understands SSL.

If you don't want (or simply cannot) install a certificate on that host then I am afraid your options are quite limited as you probably do not have the possibility to modify Netfilter or to run other software which could forward connections.

  • This was my thought on the issue but I didn't know enough to confirm. Thank you for the assistance! May 30, 2013 at 0:13

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.