Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Fri Oct 18, 2019 5:15 am


Username:
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
 
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation code
Confirmation code:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.
     

Topic review - PHPBB-SEO sets canonical URL to http when server protocol is set to HTTPS
Author Message
Post subject: PHPBB-SEO sets canonical URL to http when server protocol is set to HTTPS  |  Post Posted: Mon Feb 16, 2015 3:51 pm
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.
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO