Hide parent directory in Apache
Apache can generate directory indexes, automatically, similar to the Unix ls command or the Win32 dir shell command. Normally, Apache will create list of all directories and files inside a directory. With default settings, parent directory will be displayed too. If you want to hide parent directory from the directory list, use IndexIgnore directive.
Open httpd.conf and near to the IndexOptions add the following line:
IndexIgnore ..
After "httpd restart" or "httpd graceful", parent directory should disappear. All details about directory indexes can be found at Apache mod_autoindex page.
Related posts
- Styling Apache directory listings
- Create XML from directory list with Apache
- Log PHP errors to the separate file
- LAMP setup: Make it faster
- LAMP setup: Apache and PHP
Follow me on Twitter