1define('WP_HOME','https://mywebsite.com');
2define('WP_SITEURL','https://mywebsite.com');
3$_SERVER['HTTPS'] = 'on';
4
1Issue was solved by removing the .htaccess file as .htaccess files was containing
2<FilesMatch ".(phtml|php|PhP|php5|suspected)$">
3Order Allow,Deny
4Deny from all
5</FilesMatch>
6
7
8reference :
9https://cwiki.apache.org/confluence/display/HTTPD/ClientDeniedByServerConfiguration
1define('WP_HOME','http://example.com');
2define('WP_SITEURL','http://example.com');
3
1if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
2 $_SERVER['HTTPS']='on';