PHPBB-SEO sets canonical URL to http when server protocol is set to HTTPS
Canonical URLs are a way of setting a fixed resource URL when the same resource is servered over multiple URLs (duplicate URLs).
A bug in
phpbb_seo_class.php file incorrectly checks if server protocol is HTTP or HTTPS, thus causing canonical URLs to be set to
http. Example of CANONICAL URL for ivorde.com forum before fix:
Code:
<link rel="canonical" href="http://forum.ivorde.com/" />
TO fix this, open
./phpbb_seo/phpbb_seo_class.php and find the following line:
Code:
...
$this->ssl['forced'] = (bool) (($config['server_protocol'] === 'https//'));
...
Notice it checks for "https//". replace this with the following line:
Code:
...
$this->ssl['forced'] = (bool) (($config['server_protocol'] === 'https://'));
...
And now canonical urls are set with correct server protocol.