3

I am trying to rediret from ssl back to non ssl in apache and I am not having any luck. Can this be done via htaccess?

RewriteEngine On
RewriteBase /

RewriteCond %{HTTPS} on 
RewriteCond %{HTTP_HOST} www.mydomain.org
RewriteRule (.*) http://www.mydomain.org/$1 [R=301,L]
Brian Barthold
  • 1,593
  • 4
  • 22
  • 39

2 Answers2

1

Try this code in your .htaccess file under DOCUMENT_ROOT:

Options +FollowSymlinks -MultiViews
RewriteEngine on
RewriteCond %{SERVER_PORT} =443
RewriteRule . http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
anubhava
  • 761,203
  • 64
  • 569
  • 643
0

First of all; is your website running properly on HTTPS? if yes; then given code should work properly to redirect from HTTPS to http version.