Friday, 8 November 2019

Redirect your https page to http page using .htaccess file

Some free hosting provider not support SSL. If some visitor try to visit https://yourdomain then show 

SSL not enable

You can redirect your https visitor to http using .htaccess file

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

 or 
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{ENV:HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

or

<VirtualHost *:443>
    ServerName www.example.com
    # ... SSL configuration goes here
    Redirect "https://www.example.com/" "http://www.example.com/"
</VirtualHost>

<VirtualHost *:80>
    ServerName www.example.com
    # ...
</VirtualHost>

No comments:

Post a Comment