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

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

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

:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
Font colour
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 forum before fix:
<link rel="canonical" href="" />

TO fix this, open ./phpbb_seo/phpbb_seo_class.php and find the following line:
      $this->ssl['forced'] = (bool) (($config['server_protocol'] === 'https//'));

Notice it checks for "https//". replace this with the following line:
      $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 ]