turquoiseowl / i18n

Smart internationalization for ASP.NET
Other
556 stars 156 forks source link

URL localisation breaks relative referenced images in LESS #236

Closed ajbeaven closed 8 years ago

ajbeaven commented 8 years ago

I'm having an issue with relative referenced images in a .less file being broken under a localized URL.

.banner {
    background-image: url(images/header.jpg)
}

I'm using ASP.NET 4.5 bundles which when using a localized URL such as www.mysite.com/ru, requests the .less file from /ru/styles/main.less when running without optimizations enabled (no bundling or minification for debug purposes). The server then attempts to find the image at /ru/styles/images/header.jpg instead of the correct location, /styles/images/header.jpg.

I'm actually surprised that main.less is actually found - is there some routing happening behind the scenes that gets applied to less files but not images?

Are there any settings I can use to make this work?