[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now



Posted on 2014-03-31
Medium Priority
Last Modified: 2014-03-31
Hi all,
my aim is to use htaccess to move all requests to https to http.
My question is this. Can this be done if the domain name does not have a secure certificate and if so then how.

This is what I have come up with but no luck
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Open in new window

Question by:Neil_Bradley
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39967957
The SSL/TLS security certificate is part of what provides the HTTPS encryption.  You can not use HTTPS without one.

Author Comment

ID: 39967973
Yes I know that but my question asks if it is possible to re direct any https requests to http?
LVL 84

Accepted Solution

Dave Baldwin earned 2000 total points
ID: 39967994
This will do it IF the site has a certificate.  If it doesn't have a certificate, the connection is never made so the re-write can't happen.  The HTTPS connection is made Before anything else.  No cert, no connection, no Rewrite.
RewriteEngine On
RewriteCond %{HTTPS} =on
RewriteRule ^ http://www.yoursite.com%{REQUEST_URI} [L,R=301]

Open in new window


Author Closing Comment

ID: 39968146
Thanks Dave, I suspected as much but good to have, confirmation.
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39968175
You're welcome.  I vaguely remembered trying that before so I re-did the experiment on two of my sites, one with SSL and one without, to make sure.

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question