Search code examples
htmllinuxlighttpdfilepath

Html, external CSS link fails on Linux


I know similar questions have been asked but cannot see why our external css link doesn't work on Linux. The folder structure on both Windows and Linux is:

/
    /static
        /css
            style.css
        /img
        /js
    /html
        index.html

The index.html links to style.css with:

<link rel="stylesheet" type="text/css" href="../static/css/style.css" />

It works on Windows but fails on Linux with a 404. This would imply that the /static folder and sub-folders don't have the correct permission but they actually have identical permissions as the /html folder. If all the /static content is placed in the /html folder then it works.

Has anyone come across a similar situation or know what the problem is?


Solution

  • Are you using mod_rewrite ? It has to be a server config issue. Make sure it is configured right