Jump to content

HTTP TO HTTPS for one page only then revert


Recommended Posts

Hi .

 

I have a very old and large site (mostly written with the help of phpfreaks !).

 

I am now told by google that the site will display an "insecure get me out of here" type message if I do not secure the personal info (more than fair)

 

I do not want to secure the whole site as I will lose 10 years of seo because, as I believe, google sees the secure site as a completely different site to the http site... not to mention the duplicate content issues

 

 have used this code that seem to work fine BUT when I leave the secure page the https stays for the whole site.

 

# rewrite individual pages to https
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^login\.php$ https://www.test.com.au/login.php [L,R=301]

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^checkout\.php$ https://www.test.com.au/checkout.php [L,R=301]

 

Any help is greatly appreciated

Cheers and thanks

 

 

Link to post
Share on other sites

as I believe, google sees the secure site as a completely different site to the http site...

 

Go with hard facts, not “beliefs”. Google specifically says that migrating to HTTPS is considered a site move, and there are detailed guides on how to do this properly.

 

The insecurity of HTTP is real, and I'm surprised that you've been doing business for 10 years and appearently never even thought about that. When your site processes any kind of relevant data, you must use HTTPS on the entire site, ideally with Strict Transport Security. If you cover just a few pages, an active attacker can circumvent the protection by simply removing the “https” from all links.

 

You can get free certificates from Let's Encrypt.

  • Like 1
Link to post
Share on other sites
This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.