0

I am using mod_userdir to share files using mod_autoindex to generate a directory index for people to browse and access them, and due to the retina burning nature of the default CSS I wish to rework the CSS to something darker. While I can do this with my README for each page, I would prefer to not need to include a README for each directory.

This is the css I used for style in my README.html, where it works fine, and what I copy pasted it into a style.css file.

body {
    background-color: black;
    color: white;
}

a:link {
    color: green;
}

a:visited {
    color: yellow;
}

a:hover {
    color: red;
}

a:active {
    color: red;
}

And here is my .htaccess file contents.

IndexOptions FancyIndexing HTMLTable FoldersFirst IgnoreCase SuppressDescription SuppressHTMLPreamble SuppressLastModified VersionSort SuppressColumnSorting IconsAreLinks NameWidth=30
IndexStyleSheet "/style.css" 

I have tried putting an absolute path to my style.css as IndexStyleSheet "/home/user/public_html". I have also tried moving the file to /home/user/public_html/css and copying the example from the documentation found here: https://httpd.apache.org/docs/trunk/mod/mod_autoindex.html#indexstylesheet

1 Answers1

0

Ok, so I FINALLY solved it myself and will include the solution for anyone who has this issue in the future:

In .htaccess I made the following change:

Line 2 IndexStyleSheet "/style.css" changed to IndexStyleSheet "/~<username>/style.css"