Author |
|
moonbug
Joined: 05 Oct 2006 Posts: 2
|
Posted: Fri 06 Oct '06 0:04 Post subject: Directory Browsing Without Showing Path |
|
|
I allowed directory browsing but it always shows the directory path. How can I prevent it from showing the directory path (Index of ...)? For example, the web page displays:
Index of folder1/folder2 <-I want this gone
* parent directory
* filename 1
* filename 2 |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7364 Location: Germany, Next to Hamburg
|
Posted: Fri 06 Oct '06 10:34 Post subject: |
|
|
You have to write a script that displayes that. Or chamge the sour from apache and compile it. |
|
Back to top |
|
Jorge
Joined: 12 Mar 2006 Posts: 376 Location: Belgium
|
Posted: Fri 06 Oct '06 11:00 Post subject: |
|
|
by including an empty HEADER file
You can set it to a full path like /HEADER in the config and it should use the same file for all indexes
But why remove it?
The user can see that in the url aswel!
/private just meast it the folder private in the root of the server that is also reflected in the url http://domain.com/private? |
|
Back to top |
|
moonbug
Joined: 05 Oct 2006 Posts: 2
|
Posted: Sat 07 Oct '06 0:04 Post subject: |
|
|
Is there a way to do this without recompiling Apache?
Reason I'm doing it is for the looks only. Sometimes the path is long about 5 sub directories.
I have seen some Apache where the INDEX line is not displayed at all, only displays the parent directory. |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Sat 07 Oct '06 16:36 Post subject: |
|
|
Jorge's suggestion is correct, but maybe you misunderstood what he meant.
There is no need to re-compile Apache.
Create an empty text file named HEADER.html in your web root directory.
Edit the file {ApacheDirectory}\conf\extra\httpd-autoindex.conf
near the bottom of this file is the line:
HeaderName HEADER.html
change it to:
HeaderName /HEADER.html
Restart Apache
All your directory listings will no longer show the directory path at the top of the page.
-tom- |
|
Back to top |
|