Directory Listings


#1

How can I modify my directory/index to list the full filename.
Currently it only lists part of the filename.


#2

Add the following line to your .htaccess file.

IndexOptions +NameWidth=*

Mark


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )


#3

Thank you, is there a way to list folders on top and files at the bottom instead of having them all mixed alphabetically?


#4

Yes there is, simply add the following line to your .htaccess file.

IndexOptions +FoldersFirst

For more information on the Apache IndexOptions directive, see the official Apache docs below.

Apache 1.3
http://httpd.apache.org/docs/1.3/mod/mod_autoindex.html#indexoptions

Apache 2
http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html#indexoptions

Mark


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )


#5

THANK YOU


http://theMezz.com


#6

I am not totally sure what you are thanking me for, but you are more than welcome :slight_smile:

Mark


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )


#7

Since we’re on the subject, how do I disable viewing the directory list when going to my domain? I don’t have my wordpress site active at the moment.


#8

The easiest “quick fix”, especially for “temporary use”, is just to stick an empty .html file named index.html in the directory. Just remember to remove or rename it when you “reactivate” WordPress :wink: .

–rlparker


#9

You can use any combination of these items in an .htaccess file.

[code]Options -Indexes

<Files .>
order allow,deny
deny from all

[/code]


#10

if you only want to disable the indexing than you only need the first line of previous post, the other lines prevent access to all the files on your site.


slauson.dreamhost.com rocks! (so does my site :))
link me


#11

I wouldn’t suggest using all those things at the same time of course. Used in various combinations along with a little scripting, those tags can be pretty useful though. Just depends on what you’re trying to accomplish I guess.

If you’ve got a popular product with a well known filestructure, simply disabling indexing might not be the only thing to be concerned about.


#12

None of these will help when the filesystem is offline as it was a few days ago though. The reason is that the configuration file will ALSO be offline.