This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Apply correct canonical tag for Forest Drive and Resin | |
* @author Freelance SEO Essex | |
* @link https://www.freelanceseoessex.co.uk/ | |
*/ | |
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
$dirname = pathinfo($actual_link)['dirname']; | |
if( $dirname === 'http:' ) { |