Forum Moderators: phranque

Message Too Old, No Replies

https to http Rewrite Rule Not Working v.2

https to http Rewrite Rule

         

manitoudos

1:51 am on Sep 28, 2007 (gmt 0)

10+ Year Member



I am interested in continuing the discussion here [webmasterworld.com...] hoping that it can solve my issue as well.

I had an SSL installed and now there is an http and an https version for every page on the site, you can type in the http and https version of a page and they both show up. My intent would be to make sure that there is only one version of a page for SEO purposes (whether Google see's the http and https version of one page as two separate pages or not, want to be safe than sorry).

There is only one directory called "/secure" that should be https, the rest of the pages should only be http. I would like to be able to redirect any https pages that should be non-secure to http, and vice versa.

The /secure folder is self-contained and calls its css and images from within that folder. The rest of the site's pages call images and the css from directories in the public_html. My file list looks something like this:

/articles (should be non-secure)
/images (should be non-secure)
/styles (should be non-secure)
/manage (should be non-secure)
/secure (should be secure)
and then there area about 70 pages in the public_html.

So in my .htaccess file, what is the best way to 301 redirect non-secure https pages to http, and make sure the secure https pages stay that way?

Thank you!

jdMorgan

3:43 am on Sep 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The code in this thread [webmasterworld.com], linked from the one you cited, should get you started.

Jim

g1smd

7:58 am on Sep 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Belt and braces.

If you are able, I would insert a <base href="http://www.domain.com/"> tag on all of the HTTP-only pages to prevent propagation of spidering using HTTP, should the other methods ever be undone, or fail to work.