skip to Main Content

I’ve been pulling my hair out over this one.

<link rel="stylesheet" href="/icons/style.css">
<link rel="stylesheet" href="/css/custom.css">

the custom.css ref works fine, the one in the icons dir just returns a "The requested URL was not found on this server.", it will work however if:

<link rel="stylesheet" href="/css/icons/style.css">

… I drop the icons dir into the CSS dir! So, my local WAMP server install is set to only read CSS files from a dir named CSS?

It’s one of those things that seems so random and is sucking so much time and energy from me.

Cheers.

2

Answers


  1. Chosen as BEST ANSWER

    Answer is, Apache reserves or configs any folder named 'icons' in some special way... https://electrictoolbox.com/apache-icons-directory/


  2. this is mean the dir is incorrect so you need to type the correct one
    if the file path points to a file in the icons folder located in the folder one level up from the current folder, then your code should be like this
    <link rel="stylesheet" href="../icons/style.css">

    if this solution not working for you try one of those
    https://www.w3schools.com/html/html_filepaths.asp

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search