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

FAQ
It is currently Wed Oct 18, 2017 5:14 pm


Author Message
mandrei99
Post  Post subject: PHPBB-SEO sets canonical URL to http when server protocol is set to HTTPS  |  Posted: Mon Feb 16, 2015 3:51 pm

Joined: Tue Aug 04, 2009 9:16 am
Posts: 245

Offline
 

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.





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "PHPBB-SEO sets canonical URL to http when server protocol is set to HTTPS"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Google reCaptcha not showing in phpbb 3 after moving from HTTP to HTTPS

mandrei99

4

1839

Sat Feb 28, 2015 8:19 am

Abraham12li View the latest post

There are no new unread posts for this topic. Phpbb: How to list the most/least viewed topics

mandrei99

0

3039

Fri Jan 23, 2015 7:43 pm

mandrei99 View the latest post

There are no new unread posts for this topic. Php hide/remove X-Powered-By HTTP header

mandrei99

0

1102

Thu Jan 15, 2015 9:35 pm

mandrei99 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
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