Created
January 27, 2017 08:57
-
-
Save Itachi261092/60060ccd3dbf2477e322a6043b82ab4d to your computer and use it in GitHub Desktop.
URL rewrite for bitrix
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
// Initialize | |
$context = Bitrix\Main\Context::getCurrent(); | |
$server = $context->getServer(); | |
$server_array = $server->toArray(); | |
// Скармливаем URL. Установить GET-параметры | |
$server_array['REQUEST_URI'] = $_SERVER['REQUEST_URI'] . $type . implode('&', $str); | |
$server->set($server_array); | |
$context->initialize(new Bitrix\Main\HttpRequest($server, array(), array(), array(), $_COOKIE), $context->getResponse(), $server); | |
$APPLICATION->reinitPath(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment