The SSL certificate on my site has expired, which has caused https requests to the site to fail.

While I am sorting out a new SSL certificate, what can I do to redirect https requests into the http requests?

The https folder of my site is sym-linked to the http folder.

  • OMG i just come to this forum for the first time to ask almost same question and it happened that it's in last few questions :D – mariotanenbaum Mar 22 '13 at 12:53

If you have Apache and mod_rewrite, then put this script in a .htaccess file that needs to be in your root folder

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
  • I am using a commercial web-host. How can I tell if mod_rewrite is on? – CJ7 Mar 22 '13 at 12:38
  • Use this code in a php script in_array('mod_rewrite', apache_get_modules()); – Prasad Ajinkya Mar 22 '13 at 12:54
  • Commenting the redirect/rewrite code will serve your purpose. – Nilabh Mar 23 '13 at 7:35

You would have added http to http redirect in your .htaccess file or your .conf file.

Open the file where the redirect has been added and comment the redirect/rewrite code.

Your website will start to resolve using http:// protocol.

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