Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
This was my thought on the issue but I didn't know enough to confirm. Thank you for the assistance! –  David Fritsch May 30 '13 at 0:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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