Kirby Rewrite Base not woking on localhost

Hi there.

I’ve just inherited a Kirby site from a new client to do some updates. Quite excited to be working on Kirby for the first time!

I downloaded a copy and moved it to a folder in my MAMP installation on localhost. Let’s call the folder ‘localhost:8888/xyz’

I modded the .htaccess file so that we have:

RewriteBase /xyz

And added this to site/config/config.php:

// URL Config
c::set(‘url’, ‘http://localhost:8888/xyz’);

All as per the docs and posts I find on this forum. Despite this relative URLs are still pointing at the localhost root.

For example the main menu code: should give access to the about page at localhost:8888/xyz/about but the link ( href="/about" ) links to localhost:8888/about rather than localhost:8888/xyz/about

Kirby version: 2.3.0
PHP running: 7.3.9

Does anyone have any ideas?

Many thanks in advance.

Are the relative URLs hardcoded?

On a side note: KIrby 2.3.0 is outdated and should be updated to the latest version 2.5.15.

Kirby should usually recognize if it’s in a subfolder without you have to set the RewriteBase

Hi there and thanks.

It looks like the main menu links have been hardcoded so Ill star there. I’ll also run that update and see where we land.

Thanks again.