Wrong panel routes on bad webhost

Hi,
i have strange problem with client who insists on hosting on horrible cheap host.

Basicaly their hosting structure consists of

.htaccess (that points to subdomains and domains)
domains
    example.com
        .htaccess
subdomains
    blog.example.com
        .htaccess

The site works only if i set

c::set('url','http://example.com');

The problem is panel has no such setting and i cant make panel links work.

I am sure this is problem with how the server is set up (in their docs they state drupal and other cmses having same problems are wrongly programmed php apps).

The problem is that client wants to have site on that hosting (they have more sites there) and i dunno how to solve this. Thx

Did you try to set the RewriteBase in your Kirby .htaccess?

RewriteBase /

Don’t really know, if it affects the panel, but’s worth a try …

Yes i was messing with it a lot.

I am posting this because i have no clue about how php gets urls from webserver. Seems like there is explicit setting that overwrites the default autodetect behavior kirby core uses. (c::set(β€˜url’,’’)) but this is not possible with panel.