Search code examples
typo3ddevtypo3-11.x

DDEV accessing wrong .css-file, different home base the productive system


I'm working on a downloaded productive TYPO3 homepage (v11.5) and set it up in DDEV.

Now during my work I recognised that the base href for inclusion of user-specified .css-files are different from the productive system.

While in the productive system, the .css-file is correctly loaded from

https://mydomain.at/fileadmin/templates/assets/css/mybootstrap2.css?1636470015

it is in the DDEV environment requested from

https://mydomain.ddev.site/sternwarte-mydomain/fileadmin/templates/assets/css/mybootstrap2.css?1674722424

Which obviously added a Typo3 page references (sternwarte-mydomain/) to the path, an therefore correctly resulted in an

net::ERR_ABORTED 404

for the GET-operation as this is the wrong location.

Any hints/suggestions where my error could be.

EDIT:

Extract of the Typoscript. Typoscript

Resulting sourcecode

Sourcecode

EDIT 2:

Site configuration:

enter image description here


Solution

  • Maybe you need to set config.absRefPrefix = / in TypoScript? Or check the entry point of your site configuration.

    Update:
    Try to set the link to the CSS file with a slash in front, e.g. file1 = /fileadmin/templates/assets/css/mybootstrap2.css. Or try to set config.baseURL = /.