Mecha CMS

Guard::kick()

Redirect current page to a different page.

2.0.0Static

Guard::kick(void);
Guard::kick(string $path);
Guard::kick(string $path, int $status = 301);

Example:

// Redirect to `https://mecha-cms.com/directory/foo/bar`
Guard::kick('foo/bar');
// Redirect to `https://mecha-cms.com/foo/bar`
Guard::kick('/foo/bar');
// Redirect to `http://example.com`
Guard::kick('http://example.com');