SSL revisted

I had read everyone inputs on how to get SSL up and running but its not completely working either in single join page or whole site.

The whole site works but slower and I get a security warning message on every page visited, also some mods do not work.

I prefer SSL on join, lost password, and admin panel access. These are essential for any social networking site especially the registration and login pages.

The solution from AntonLV works without Captcha but on the join page, the login section does not work, the popup modal login works but I assume this is not going through SSL. With Captcha the image does not show up so the solution does not work and I had tired this too:

function recaptcha_get_html ($pubkey, $error =null, $use_ssl =false)

to read as

function recaptcha_get_html ($pubkey, $error =null, $use_ssl =true

Solution from AntonLV

It is working form me :)

In the .htaccess file right after the line 

 

RewriteEngine on

 

add the code

 

RewriteRule "^(pedit.php)$" - [env=whwSecure:https]

RewriteRule "^(join.php.*)$" - [env=whwSecure:https]

 

#Redirect to normal site.

RewriteCond %{HTTPS} on

RewriteCond %{env:whwSecure} !https

RewriteCond %{REQUEST_URI} !^.*simg.php

RewriteCond %{REQUEST_URI} !^.*tiny_mce_gzip.php

RewriteCond %{REQUEST_URI} ^.+.php [OR]

RewriteCond %{REQUEST_URI} ^.+/$

RewriteRule "^(.*)$" "http://%{HTTP_HOST}/$1" [R=301,L]

 

#Redirect to Secure site

RewriteCond %{HTTPS} off

RewriteCond %{env:whwSecure} https

RewriteRule "^(.*)$" "https://%{HTTP_HOST}/$1" [R=301,L]

 

then in the inc/header.inc.php file before the line and change "yoursite.com" with your actual site

 

$admin_dir                 = "administration";

 

insert the code

 

$aSSLURLs = array(

'/pedit.php',

'/join.php',

'/simg/simg.php',

'/plugins/tiny_mce/tiny_mce_gzip.php',

);

if(in_array($_SERVER['PHP_SELF'], $aSSLURLs)) {

$site['url'] = "https://yoursite.com/";

}

 

I hope collectively, the contributors will have a solution for SSL on registration and login pages.

Thanks!

Quote · 5 Nov 2014

I have SSL on my whole sites - are you wanting to just do a single page - I have not figured that out. But for a whole site, all I did was add this to the htaccess page:

RewriteCond     %{SERVER_PORT} ^80$

RewriteRule     ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

 

And make sure the site url has https in the header.inc.php page. That was it and my SSL works with no issues on a full site.

caredesign.net
Quote · 5 Nov 2014

@ProfessorSr, thank you for your guide and it did work, but my concern was that the site is slower, certain mods will not work, and a few fixes are required eg. browser secure popup, 3rd party theme adjustments.

BTW, did you get any warning messages when visiting your SSL site through mobile devices? I have a valid SSL cert and get the red bar warning message in Chrome and broken shield in Firefox. 

Hope it is possible to secure just the join and login forms.

Thanks again!

Quote · 5 Nov 2014

If your getting a cert warning in the browser, then it could be a number of reasons.

1) Cert not matching domain your using it on.

2) Self signed cert.

3) Mixed content. Meaning you may be pulling ads or calling other external content using non-secure http requests instead of https requests. Mixed content is not allowed on a secure site. So you need to check any external urls your site is pulling content from. Those must be secure as well.

https://www.deanbassett.com
Quote · 5 Nov 2014

Mixed content as Deano pointed out.

One such source could be calls to Google APIs.  You must call these with https; such as Google maps APIs.

Geeks, making the world a better place
Quote · 5 Nov 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.