I have a simple configuration where I want to use the autoindex feature for a particular directory. The following is the basic outline of the configuration:
server {
root /var/www;
...
location / {
index default.html
}
...
location /somedirectory {
autoindex on;
}
}
I want to prevent the parent directory handler from returning to default.html. Currently accessing:
url/somedirectory
Gives the following:
--
Index of /somedirectory/
--------------------------------
../ { clicking here returns to default.html, I want to prevent this at the top level directory }
directory1/
directory2/
directory3/
Ideally I would fix it in the web page but I have limited control to change at this point, someone stuffed the directory listings page in an iframe which means going back up one directory gives a duplicate index page inside the existing index page.
server {
root /var/www;
...
location / {
index default.html
}
...
location /somedirectory {
autoindex on;
}
}
I want to prevent the parent directory handler from returning to default.html. Currently accessing:
url/somedirectory
Gives the following:
--
Index of /somedirectory/
--------------------------------
../ { clicking here returns to default.html, I want to prevent this at the top level directory }
directory1/
directory2/
directory3/
Ideally I would fix it in the web page but I have limited control to change at this point, someone stuffed the directory listings page in an iframe which means going back up one directory gives a duplicate index page inside the existing index page.