How can I prohibit the directory listing?


#1

Hello,

All the directories i create in DH hosting, those directories listing is by default enabled, how to disable it? Is there any option so that all new directories I create, for them, listing is disabled?

Jigar Mehta
India


#2

Add the line below to your .htaccess file. If you do not already have one, create a file called .htaccess and place it in your domains root directory, which by default is named the same as your domain.

Options -indexes

Note: This will affect the directory you place the file in and all lower directories.

Mark


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


#3

Oops!!

There comes another question. Say, if I want to override this default behavior of not listing directories for a particular sub directory, I mean for that particular sub-directory, I want to show the directory listing, what should I do?

Putting empty .htaccess file (without Options -indexes) would work?

Jigar Mehta
India


#4

Got it!!

I cerated .htaccess inside that folder and had following content,
Options +indexes

It allows me to show directory listing for that specific directory. Thanks mark, for giving prompt reply.

Jigar Mehta
India


#5

Almost :slight_smile:

You just need to place another .htaccess file in the subdirectory with the following line;

Options indexes

By the way, this forum section (‘Curious About DreamHost’) is probably not the best place to ask general questions as it’s primary purpose is to provide information for potential customers. Perhaps the ‘General Troubleshooting’ section would be more suited.

Mark


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


#6

Excellent.

Our posts seemed to have crossed and you solved it before I had a chance to click the post button. :slight_smile:

Hmmm… There is supposed to be a ‘+’ before the ‘indexes’ in my post above, but the forum software insists on eating it, regardless of how many times I try to edit the post. :open_mouth:

Mark


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


#7

I’ve seen many questions here that were more targetted for other parts of the forum, but maybe people think that the answers here are quicker :stuck_out_tongue: ?

Dreamhost $97 promo code

[color=#CC0000]97promo[/color] will give you $97 off
[color=#CC0000]90promo[/color] will give $7 to Unicef


#8

I’ve noticed that too! I wonder if that is because some are especially quick to reply to posts in this forum category in order to get their promo codes in front of potential new customers? :wink: It’s all good!

–rlparker


#9

Not likely the cause of OPs, but possibly the cause of so many answers. :wink:


They need more support help.
Pay me (and DreamHost gets 5%+$0.30) Cut the code: [color=#00CC00]9999=$99.99 Off[/color]


#10

I tend to leave my browser on the ‘Past 24 hours’ page, that way I can see new posts in all forum areas.

On the subject of promo-codes; to be honest, I don’t make many referrals from this forum, which is totally understandable given the larger promos on offer here. Most of my referrals originate from my various sites, in fact I would guess that I would lose some referrals as they make their way to the forum and find a bigger discount, but such is life, I don’t lose any sleep over it.

One recent trend that I find interesting is the number of posters that only seem to be able to post in the ‘Curious About DreamHost’ forum. I am not sure why this is, but perhaps they are using the DreamHost frontpage to check for new posts and never see posts in the other forum sections.

Come on guys, there are 10 other forum sections with people desperately needing your expertise. :slight_smile:

Mark


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


#11

Let’s target “promotion.” With only 50 threads, it’s seriously under-utilized.

Curious is top of the list, and covers it all.


They need more support help.
Pay me (and DreamHost gets 5%+$0.30) Cut the code: [color=#00CC00]9999=$99.99 Off[/color]


#12

Well, to be honest I never saw a thread in the curious section without any replies, and I’ve seen some in the other places…
Some questions here don’t even have anything to do with Dreamhost…

Dreamhost $97 promo code

[color=#CC0000]97promo[/color] will give you $97 off
[color=#CC0000]90promo[/color] will give $7 to Unicef