HTTPS redirect to HTTP
Posted: Thu Mar 12, 2009 1:53 pm
The site I am currently working on was at one time completely behind SSL.
Search engines have picked up some pages and now when you click a link the page is dead because SSL has now been disabled.
Is there a simple way I can add an directive to .htaccess to basically redirect the SSL request onto a non-SSL request.
The pages exist but cannot be accessed via HTTPS but Google has now cached the pages as HTTPS so ideally whenever someone clicks a link on Google (Yahoo, whatever) which is HTTPS they are simply redirected to the HTTP version instead.
I assume this is a simple one liner? Can you show me an exmaple please
I am trying to force a redirect to http://www.domain.com in case the user enters without sub-domain as well. The last bit of uncommented code doesn't work either.
Cheers,
Alex
Search engines have picked up some pages and now when you click a link the page is dead because SSL has now been disabled.
Is there a simple way I can add an directive to .htaccess to basically redirect the SSL request onto a non-SSL request.
The pages exist but cannot be accessed via HTTPS but Google has now cached the pages as HTTPS so ideally whenever someone clicks a link on Google (Yahoo, whatever) which is HTTPS they are simply redirected to the HTTP version instead.
I assume this is a simple one liner? Can you show me an exmaple please
Code: Select all
RewriteEngine On
#RewriteCond %{HTTP_HOST} !^www\.domain\.com$
#RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301]
php_value session.cookie_domain ".domain.com"
RewriteCond %{HTTPS} =on
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Cheers,
Alex