Commit d3416b22 authored by Olga's avatar Olga

Каноникал

parent baa17091
<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
if (file_exists(__DIR__ . '/include/redirects.php')) {
require_once(__DIR__ . '/include/redirects.php');
}
//if (file_exists(__DIR__ . '/include/redirects.php')) {
// require_once(__DIR__ . '/include/redirects.php');
//}
AddEventHandler('main', 'OnEpilog', array('CMainHandlers', 'OnEpilogHandler'));
class CMainHandlers {
public static function OnEpilogHandler()
{
global $APPLICATION;
$CURRENT_PAGE = "https://";
$CURRENT_PAGE .= $_SERVER["HTTP_HOST"];
$CURRENT_PAGE .= parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$APPLICATION->SetPageProperty('canonical', $CURRENT_PAGE);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment