Dotless File Yields 404 Error in IIS

后端 未结 2 2041
野趣味
野趣味 2021-02-14 05:31

I\'ve been successfully using .less files in my dev Cassini server (with dotless) for a few weeks but when I publish to my local IIS server they yield 404 errors. A

2条回答
  •  野性不改
    2021-02-14 05:52

    Looks like you're missing a mime type on IIS.

    For IIS7 add the following to your web.config:

    
        
            
        
    
    

    For IIS6 you can do (presuming you have administrator RDP access):

    cscript adsutil.vbs set W3SVC/1/Root/MimeMap ".less, text/css"
    

    Where /1/ is the IIS number of the site.

提交回复
热议问题