forwarding http to https - Page 2 - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Computer Tech > Linux Web/Security

WebmasterForums.com is the premier Forum on the internet. Registered Users do not see the above ads.
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-08-2011, 12:39 AM   #11 (permalink)
Junior Member
 
Join Date: Jan 2011
Location: San Jose, CA
Posts: 86
Default Re: forwarding http to https

Which SSL you have purchased! I am not clear with your question.. if you have an SSL then it should be https:// only and if you have registered your site without www. then your SSL will not run on

SSL Certificates
| Code Signing Certificate
hillaryjohnson is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old 02-15-2011, 01:42 AM   #12 (permalink)
Regular User
 
Join Date: Feb 2011
Posts: 73
Default Re: forwarding http to https

Why don't you just park all the search result pages to all one domain name which is https ?
JerrickYeoh is offline   Reply With Quote
Old 06-08-2011, 08:23 PM   #13 (permalink)
Junior Member
 
Join Date: Jun 2011
Posts: 1
Default Re: forwarding http to https

I do the following in php

PHP Code:
if ($_SERVER['HTTPS'] != "on") { 
header'Location: https:// www  .yoursitehere . com' $_SERVER['REQUEST_URI']  ) ;

jaychristopher is offline   Reply With Quote
Old 09-05-2011, 11:09 PM   #14 (permalink)
Junior Member
 
Join Date: Sep 2011
Posts: 22
Default Re: forwarding http to https

Hi moremoney365,

The fastest way is to add the following lines to your .htaccess:

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,NC,QSA,R=301]

This will keep the original require uri/url path as well which is more convenient for your users. Note the R=301 is important. It tells apache to redirect your user with the HTTP Status Code 301. 301 tells the browser (and search engines) that in the future they should go straight to the HTTPS version. This will stop the HTTP version of your site showing up in search engines and will contribute any HTTP page ranks to your HTTPS site.
hoodle is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisement

» Advertisement

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Advertisement

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 04:57 PM.


Powered by vBulletin® Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting