Log in

View Full Version : Board Optimization - JD - Use SSL in Admincp only


Jorandh
03-11-2015, 10:00 PM
This is a step-by-step guide on how to enable SSL within the Admincp ONLY, so you can use http:// troughout the whole board, but enable https:// usage when you're in the admincp.


Find in /includes/functions.php:
$url = normalize_path($url);

Add after (on a new line!):
$url = (strpos($url, '/admincp') === true ? str_replace('http://', 'https://', $url) : $url);



Find in/includes/adminfunctions.php:
var AJAXBASEURL = \"" . VB_URL_BASE_PATH . "../\";

Replace with:
var AJAXBASEURL = \"" . str_replace('http://', 'https://', VB_URL_BASE_PATH) . "../\";



Find in /admincp/index.php:
$versionhost = REQ_PROTOCOL . '://version.vbulletin.com';

Replace with:
$versionhost = '//version.vbulletin.com';



Find in /admincp/index.php:
<form action="http://www.ph' . 'p.net

Replace with:
<form action="https://www.ph' . 'p.net



Find in /admincp/index.php:
<form action="http://www.mysql.com/

Replace with:
<form action="https://www.mysql.com/




That's all, I hope you'll enjoy this little tweak as much as I do myself.

Brakedirt
01-16-2016, 10:34 AM
Is there a way to do it for registration and login only?

ekempter
01-18-2016, 06:22 AM
Is there a way to do it for registration and login only?

Skip this mod and turn on SSL for the entire site.

Brakedirt
01-18-2016, 06:35 AM
Skip this mod and turn on SSL for the entire site.

When you use SSL on your forum, and somebody embeds an image from a non-ssl host, lots of browsers will give you a warning and say the website is unsafe ...
and then I need another addon....