Jcow Blog |
Go to http://www.cloudflare.com and login.(If you don't have an account, just sign up free)
Click "add site" on the top menu, and step by step add your Jcow site domain. You can select "Free plan" while adding site.
On Cloudflare, click your site name, and click "Page Rules" on the top menu, you will see a "Add new rule" section. Enter /*
in the "Rule pattern", and click to turn on the "Always https", and click "Add rule" button.
Edit your config file my/config.php, add these lines just in beginning of the source code:
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$arr = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
$_SERVER['REMOTE_ADDR'] = trim($arr[0]);
}
Then edit the $uhome
value, modify http://
to https://
Please note, there will be a few hours before the SSL enabled due to DNS TTL.
If you have any questions, please comment here.