You need to tell Apache to show files as text / css when their extension is .css . The only reasonable way for your server to distinguish between a stylesheet and any other type of text file is by file name.
You can do this by editing a configuration file like Apache MIME called mime.types (it lives in a different folder depending on your distribution, maybe try / etc / apache2) to make the following association:
text/css css
Alternatively, if you do not have administrator access, you can create a .htaccess file in your own root web server. Read more about both methods here.
Hope this helps!
After re-reading our question, perhaps I misunderstood you, and you have already taken the steps above?
If so, could you check that your OS reads mimetype like? There are suitable commands for checking mimetype, here :
Also, it seems like it would be pragmatic to add a follow-up check to see if the file extension ends with .css. Is there a reason why this will not work?
source share