We are trying to run Craft CMS not under example.com but under example.com/subpath. So we want the following paths:

  • Frontend: example.com/subpath
  • controlPanel: example.com/subpath/admin

In the .env


Which is also used inside the Settings for the base url.

In the general.php

        '@web' => App::env('PRIMARY_SITE_URL'),
        '@webroot' => dirname(__DIR__) . '/web',

Everything "works". Except axios requests. For example: trying to login to the controlpanel results into an 404. Because it tries to call http://example.com/index.php?p=admin%2Factions%2Fusers%2Flogin&v=1709708188780

deleting the cpressourcen does nothing. axios somewhere gets the wrong base url.

I think im missing a setting. I don not thing their is a problem with the webserver?


1 Answer 1


Das Problem lag an der Craft CMS Version < 4.8.1 / 4.8.2.

Konnte mit 4.8.3 geloest werden.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.