when I enable free SSL in cloud-flare, my magento website stops loading properly. Basically CSS and JS doesn't load but without HTTPS the website works fine, but with HTTPS website does not load CSS and JS. I tried with below code in index.php, but didn't work.
if (isset($_SERVER['SERVER_PORT']) && (443 == $_SERVER['SERVER_PORT'])) $_SERVER['HTTPS'] = 'on';
Please help!!