Path to resources

in the templates there are several places where the path to resources (e.g. css, pictures etc.) is retrieved via (example)

As a result you get (example)


What is the right way to get the result without the host part, e.g.:



Hi MK,

why you want to do so?

The most easy way would be to write it like this: <link rel=“stylesheet” type=“text/css” href="/sdp1/out/basic/src/oxid.css">

but is deadly if you once have to move your shop.

On the other hand you have to adopt the getResourceUrl() function.

Marco Steinhäuser
Community Guide
OXID eSales AG

Hi Marco,
I just wanted omit the host part in case the shop is accessed via different host names.
Especially in this case:
The test shop was configured for localhost access only in first place but now I want to have it available from other computers as well. So I have to use
“http://<servername>:82/sdp1/” instead of “http://localhost:82/sdp1/

But now all the resources are unavailable as the getResourceUrl() returns the path incl. the servername.
Now I found out that I could configure

$this->sShopURL     = 'http://localhost:82/sdp1';

Are there any negative impacts if I change it as follows?

$this->sShopURL     = '/sdp1';

Bye, Martin

TBO: I didn’t check that out. Give it a trial :wink: Switching back shall be simple.


Marco Steinhäuser
Community Guide
OXID eSales AG