0

I tried all the answers mentioned on a search engine for redirecting site from https to http but these are not working for me.

I tried: How do you redirect HTTPS to HTTP? and http://wp-mix.com/htaccess-redirect-http-to-https/ all methods here

Let me explain little more here:

Before my site (combustiondepot.com) is the separate site and having ssl installed there. Everything is working fine that time. After that we deleted the main combustiondepot.com site and make it addon domain for our main domain industrialstores.com.

Now site is working fine except for https. Whatever I changes I am making in htaccess or php these are of no use.

Community
  • 1
  • 1
  • 2
    did you tried http://stackoverflow.com/a/13000059/2952582 – dlyaza Apr 22 '14 at 12:30
  • https://productforums.google.com/forum/#!topic/webmasters/yyArfCo7jZE check this one. – Piyush Apr 22 '14 at 12:32
  • tried both solutions but not working – user3438880 Apr 22 '14 at 12:37
  • Let me explain little more here: Before combustiondepot.com is the separate site and having ssl installed there. Everything is working fine that time. After that we deleted the main combustiondepot.com site and make it addon domain for our main domain industrialstores.com. Now site is working fine except for https. Whatever I changes I am making in httaccess or php these are of no use. – user3438880 Apr 22 '14 at 13:45

1 Answers1

0

The examples above work if you have .htaccess allowed in your config. Allow Override

If you want to do it using code you could do something like this assuming your using php.

<?php
if  ( $_SERVER['HTTPS'] )
    {
            $host = $_SERVER['HTTP_HOST'];
            $request_uri = $_SERVER['REQUEST_URI'];
            $good_url = "http://" . $host . $request_uri;

            header( "HTTP/1.1 301 Moved Permanently" );
            header( "Location: $good_url" );
            exit;
    }
?> 
Community
  • 1
  • 1
Lance Badger
  • 791
  • 8
  • 13
  • Let me explain little more here: Before combustiondepot.com is the separate site and having ssl installed there. Everything is working fine that time. After that we deleted the main combustiondepot.com site and make it addon domain for our main domain industrialstores.com. Now site is working fine except for https. Whatever I changes I am making in httaccess or php these are of no use. – user3438880 Apr 22 '14 at 13:44