Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

redirect ssl to non ssl

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]
like image 420
Brian Barthold Avatar asked Dec 07 '25 20:12

Brian Barthold


1 Answers

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]
like image 107
anubhava Avatar answered Dec 09 '25 17:12

anubhava



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!