Bitrix Site Manager

LocalRedirect

LocalRedirect(
 string url
)

The function LocalRedirect performs the client browser redirect to the specified page.

Note
In the administrative section, redirects can only be used before any content is outputted (before inclusion of prolog_admin_after.php or prolog_admin.php). The public section does not apply restrictions on redirects .

Parameters

ParameterDescription
url URL to which the browser is to be redirected. Both relative and absolute URL's are accepted in this parameter. Absolute URL's should be of one of the following protocols: "http://", "https://", "ftp://".

Example



<?
// fully qualified URL to another site
LocalRedirect("http://www.bitrixsoft.com/");

// relative to the current site roor
LocalRedirect("/en/index.php");

// relative path to a file in the current folder of the current site
LocalRedirect("index.php");
?>