Redirect https to http

1

I have an Apache server without certificates.
I need that when someone enters the website always redirects to the http version.

In the link file I have the following, but it is not working.

<VirtualHost *:80>
ServerName misitio.com
DocumentRoot "C:/Apache24/htdocs"
</VirtualHost>

<VirtualHost *:443>
ServerName www.misitio.com
ServerAlias misitio.com
Redirect permanent / http://www.misitio.com
</VirtualHost>

Is there anything I'm doing wrong?

    
asked by Pepemujica 05.04.2017 в 01:42
source

3 answers

0

Try this

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
    
answered by 05.04.2017 в 02:41
0

You have to add this line:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
    
answered by 06.04.2017 в 17:08
0

The .htaccess file is located at the www level, at the root of your site. Add this to the .htaccess file: RewriteEngine On RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

To create, install and configure a certificate on the server:

Install: Install Let's Encrypt to Create SSL Certificates

Configure: SSL Certificates with Apache on Debian & Ubuntu

What is Let's Encrypt?

Let's Encrypt is a Free, Automated, and Open Certificate Authority

    
answered by 03.08.2017 в 19:03