I am trying the following. I have a domain where I publish. This publication is only by http, but I need all requests by https to redirect me to http since I do not have ssl certificate installed and configured for this.
I have tried to add in the .htaccess file of the documentroot where I have the application the following lines:
RewriteEngine On RewriteCond% {HTTPS} on RewriteRule (. *) Http: //% {HTTP_HOST}% {REQUEST_URI} [R = 301, L] But this does not make me that anything that enters through https redirects me to http. What would I be missing?
Best regards.
Edit:
OK.
Perfect now I think I understand it a little better. To redirect https to http, you must have an ssl certificate generated and stored on the apache server.
As a test, I created a self-signed certificate using the openssl tool
openssl req -x509 -nodes -days 365 -newkey rsa: 204 ..... I have generated it correctly.
The next step has been enabled the default-ssl.cnf site in which I add the paths of the ssl certificate data generated previously.
In this step, what action do I have to do to enable that redirection from https to http for my instance of wordpress for example.
Here is my default-ssl.conf file
<IfModule mod_ssl.c> <VirtualHost *: 443> ServerName www.mydomain.org ServerAdmin webmaster @ localhost DocumentRoot / var / www / html/wordpress <Directory /> FollowSymLinks options AllowOverride None </Directory> <Directory / var / www / html /> Options -Indexes + FollowSymLinks + MultiViews Allow to cancel all </Directory> ErrorLog $ {APACHE_LOG_DIR} /error.log Record Level Warning CustomLog $ {APACHE_LOG_DIR} /ssl_access.log combined SSLEngine on SSLCertificateKeyFile /etc/apache2/sslcert/apache.key SSLCertificateFile /etc/apache2/sslcert/apache.crt #SSLCACertificateFile /etc/ssl/certs/bundle.crt BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 # MSIE 7 and later versions should be able to use keepalive BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown </VirtualHost> </IfModule> Regards