Getting relative urls in Kirby 2.5

After upgrading a site to 2.5.0 I’m getting relative URLs for all page links and assets.
The site is fine on my local environment, the issue is only happening on my server (webfaction hosting). Here is the starterkit running on the server with the issue:

any clues what might cause this?

I’m able to fix this by setting the base URL in the config.php


but still curious if it’s a bug in 2.5.0 or a setting on the server

I got the same problem after updating my test enviroment… seems to be bug :wink:

See this issue on GitHub:

I can’t reproduce this locally, haven’t tested on a remote server yet.

Something seems to be wrong with 2.5.

I’ve used the Kirby 2.5 Plainkit to create a new setup (in a subfolder). The RewriteBase does not seem to be working - even though this was not required in other similar setups - and this is causing a problem when using the css & js functions to load assets.

I really hope it’s a bug. I’ve not yet tested 2.5 but there are a few reasons why relative urls should not be used:

1 Like

This is certainly not intended behavior…


Hm, I just did a test with a fresh 2.5.0 Starterkit on a remote server and I don’t get this behavior, so I wonder what might be causing this for you.

That’s weird. I have installed a fresh 2.5.0 Starterkit on two different computers, and in both installations, $page->url() outputs relative urls.

I have only tried this locally, not on a remote server. Locally, I have tested both with a localhost adress, and a custom domain using Mamp Pro.

I tested it on my localhost now and the it worked for me. I use PHP7. My Engineer field seems to be broken with 2.5, but that’s another story… (update: it seems to be a bug in the toggle field #1063)

I’ve upgraded to 2.5.0 via the Kirby CLI, and the same problem appeared for me. $page->url() only outputs https://screenshots/noctuelles for example, and the Kirby TinyURL field only displays URLs like /s/1cg4l3x as well.

It’s strange that different people get different results. I get the full url with this field.
Quite strange.

I have tested it local with XAMPP 7.0.13 and XAMPP 5.6.12 on Win10 (XAMPP version number = PHP version), I installed the starterkit in a subdirectory of the html root (e.g. at E:\xampp_7.0.13\htdocs\kirby_2.5.0\ ), running at a special port (e.g. or at port 80 and have no problems.

So I am sure, your system is different.

Do you have the unchanged file .htaccess from Kirby in the root of your Kirby installation?
If you have made some changes, please tell us the difference.

Did you change or add anything in the file /site/config/config.php?

Have you checked the permissions and the groups of the Kirby files and directories on your webserver after copying/installing the new Kirby version?

@ola: As you have experienced this on Mamp pro, could you let me know your Mamp settings to reproduce this? Type of server, PHP version etc.

1 Like

Sure. Here is my setup:

A Mac running OS X 10.12.4.
Mamp Pro v4.1
PHP version 7.1.0 (has also tried with v7.0.13 and v5.6.28)
Apache port 80

I have tried running a fresh installation of the starterkit both with the localhost domain name, and a custom host name e.g.

I have not touched any other settings in Mamp than these.

I have tried the starterkit both on my work machine and my mac at home with the same results.

I have not tried Kirby 2.5 on a remote server, only locally with Mamp Pro.

@texnixe Here is a screenshot as a proof:

Ok, so we have almost identical settings, my OS is 10.12.5, Mamp Pro 4.1.1 with Apache and PHP 7.1.0 and I tried with both localhost and custom domain, links work as they should:

This is crazy…

Do you have a file .htaccess in the root of your Kirby installation?

Yes the .htaccess file from the starterkit is in the root of the Kirby installation.