970_90

Tuesday, 20 January 2015

Wordpress redirect https to http with htaccess [SOLVED]

Wordpress redirect https to http with htaccess [SOLVED]

You can redirect all website pages from https to http. It will be redirect only when you open the page with https. 

See Example Below
https://example.com Redirect to http://example.com
https://example.com/page1/ Redirect to http://example.com/page1/
https://example.com/page2/ Redirect to http://example.com/page2/


Open .htaccess in root folder
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Replace with Following code
RewriteEngine On

RewriteCond %{SERVER_PORT} ^443$ [OR]
RewriteCond %{HTTPS} on
RewriteRule  ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]




;

1 comment: