mardi 19 juin 2018

Relative paths in CSS not resolving

Recently inherited an MVC project which needed to be deployed in a new server environment.

The CSS files reference many images with relative paths - background-image: url('../images/etc.png'); - which load fine locally but give a 404 error on the live site.

Not sure if relevant but this new environment hosts lots of Web Forms sites which use relative paths in exactly the same way and they load fine.

I've tried changing to absolute paths - background-image: url('/Assets/images/etc.png'); - and this works, however finding every path that needs changing would be time consuming.

Is there some IIS config or global setting that might resolve this?




Aucun commentaire:

Enregistrer un commentaire