How to Redirect HTTPS to HTTP for Catalog & Product Pages

httpssecure

we are using https for secure pages.

we can see http for unsecure pages – products and catalog pages.

we can see https for secure pages – My account, Login pages.

But if we manually type https:// for home , catalog & product pages, its redirecting to https only. but i want to redirect to http

before home page, catalog & product pages are in https.

i followed this in .htaccess:

#Redirect your Homepage from HTTPS to HTTP
RewriteCond %{HTTPS} on
RewriteRule ^$ http://%{HTTP_HOST} [L,R]

source : http://www.activo.com/redirect-https-to-http-for-any-homepage/

Than home page is working fine.

if we manually type https://example.com for home page ,its rediretcting to http://example.com. It's fine

what i have to do for catalog & product pages.

enter image description here

Best Answer

Method 1: You may try this as well. It is specifically targeting your catalog and product page with help of editing .htaccess

    RewriteEngine On
    RewriteCond %{HTTPS} on
    RewriteEngine On

    # From https to http
    RewriteCond %{REQUEST_URI} !^/catalogpage/
    RewriteCond %{REQUEST_URI} !^/productpage/
    RewriteRule ^(.*)$ http://%{HTTP_HOST} [L,R=301]

And set "Auto-redirect to Base URL" to NO under System -> Configuration -> Web -> Url Options

Method 2: Please visit following tutorial about redirecting https to http on catalog and product page:

https://www.designhaven.co.uk/2013/06/redirecting-secure-https-non-secure-http-magento/

Related Topic