• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

allow a directory to index for a particular customer

I

ilustrate

Guest
i was wondering if there was a way for a customer to allow indexing on a particular directory. i have a customer that has a set of images that she regularly links to. but she on occasion forgets the image name. she is mobile lots of times and really would just like to index this directory and look up the name real fast. can i add an .htaccess file on the directory or something to allow it to be indexed?
 
Yes you can create a .htaccess file with the following contents:

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
Options +Indexes

Assuming you have a directory with her files:

/home/httpd/vhosts/domain.com/httpdocs/files

Place the .htaccess file into that directory and it will affect that directory and any subdirectories under it. As long as there is no index file present, then Apache should then show a list of the files instead.
 
thanks, james. i installed it exactly as written and it worked like a charm. my client is very happy and has already started using it.
 
Hi,

This works perfectly when doing this for the main domain, however I have been trying to configure this for a subdomain and this does not work, I also attempted to do this using a vhost.conf file for the subdomain with

Options +Indexes

For the directory and it still did not work, I updated both plesk and restarted the webserver and it still does not allow me to show a directory listing. I have been looking around but have been unable to find an answer.

Has anyone been able to achieve this for subdirectories?

Thnks
-- w
 
I've experienced the same problem, where the root of a subdomain won't index, but subdirectories within the subdomain will. It's very annoying because it's forced me to create a subfolder inside by subdomain, keep everything in there and do some nasty redirects.
 
First, you should post your question in the Windows forum, not the Linux forum.
 
Back
Top