Forum Moderators: phranque

Message Too Old, No Replies

Routing HTTPS to HTTP

Using .htaccess file

         

pcs800

5:09 pm on Sep 24, 2011 (gmt 0)

10+ Year Member



My site no longer uses SSL, so I have done the following.

When I comment this entry in the httpd.conf file
# Secure (SSL/TLS) connections
# Include conf/extra/httpd-ssl.conf

It does disable ssl, so I add this to the .htaccess file
RewriteEngine On
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ [mysite.com...] [R,L]

Which then seems to disable the first one.

Meaning, if I uncomment, leaving this
# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf

The redirect to http works, but not if I comment out the second line.
Doesn't this leave SSL active on the server? How do I deactivate it and still get the redirect?

phranque

8:53 am on Sep 27, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, pcs800!

the server will never see the request until the SSL handshaking has completed successfully.
if you comment out the ssl config directives, the server is likely not even listening to port 443.

pcs800

12:08 pm on Sep 27, 2011 (gmt 0)

10+ Year Member



Thanks for the reply, so is there another way to completely remove the ssl certificate from the site but also redirect https requests to http?