Skip to content

Kirby 3.5.7.1

$kirby->url('index')

Returns the base url of the site

Example

<?= $kirby->url('index') ?>

Custom setup

If you want to overwrite the Url you can do this in your index.php by passing a custom Url setup to the Kirby constructor.

/index.php
<?php

include 'kirby/bootstrap.php';

$kirby = new Kirby([
    'urls' => [
        'index' => 'https://example.com/custom/url',
    ],
]);

echo $kirby->render();