Pavel Vlasov
Pavel Vlasov

Reputation: 4331

Less CSS does not work on a HTTP server

Basic Less CSS code works fine when run from local file system:

<link rel="stylesheet/less" href="style.less" type="text/css" />
<script src="less-1.0.21.min.js"></script>

But once I move my code to a HTTP server, Less CSS becomes unable to find the stylesheet file and all the styling gets broken. The server (App Engine) returns *.less as "octetstream" actually. I tried to copy "style.less" to "style.txt" but with no success.

What does Less CSS needs to work on servers?

Upvotes: 0

Views: 2393

Answers (1)

fyr
fyr

Reputation: 20859

That depends heavily on your http server. But you can map in most webservers suffixes to mime types per configuration.

In apache something like this could be a solution

AddType text/css .less

See mod_mime

Upvotes: 4

Related Questions