I’ve read some of the linked resources for this, and it seems very straightforward. But I can’t get it to work the way I expect. I made an .htaccess file in the web root which contains only “IndexIgnore /”. Now browsing is disabled everywhere. So far, so good. Now I go to a subfolder and make another .htaccess file which contains only “Options +Index”. I expect to be able now to browse that subfolder. But I cannot. What’s wrong? My expectations, or my .htaccess files? Or some Apache setting I don’t know about?
Thank you for that. The thread was an interesting read, and I suspect it will be even more entertaining and helpful when I have advanced my knowledge some. I think for now, I will look for something even simpler, and have just posted a specific request for help.
[ot]
I really want to use some hover-style drop-down menus on an upcoming project, and it looks like the best way to do this, especially if I want to be nice the IE6 people, is JQuery. SO…ah…now I’m learning Javascript.
Actually, our very own YuriKolovsky came up with a pure-CSS dropdown menu that works in IE6 as well.
Though if the dropdowns aren’t Megas, then having a small onmouseoff delay and some extra keyboard support with JS is nice. I’ve used Blake Haswell’s Suckerfish 2 Javascript which is quite nice. His CSS has a slight problem in Gecko and IE6, but it can be fixed in CSS as well.[/ot]
Nice, maybe I will be able to say the same after a few years.
Thanks for the encouragement, I definitely plan to stick around this board some…it looks like a friendly place as well as a great resource. I had hoped to spend a bunch of time on PHP stuff this week, but have already been side-tracked: I really want to use some hover-style drop-down menus on an upcoming project, and it looks like the best way to do this, especially if I want to be nice the IE6 people, is JQuery. SO…ah…now I’m learning Javascript.
POS,
Yeah, a stray .htaccess will do that to you!
I’m glad that you know NOT to use ftp_userx and DO know how to password protect. Sorry, no offense intended so I’m happy that you did not (apparently) take offense with my comments. :x
I’m very happy with my MANAGED VPS as I get the power to “futz” with it when I believe that I won’t do any damage but can rely on the support staff to deal with the routine issues of server management. I’m sure you’ll be back on a VPS when you discover the problems with shared hosting (it’s a trade-off between the lower cost and significant additional storage and bandwidth vs tight limits on shared PLUS sharing a mail server with spammers - that’s what drove me to VPS).
We’ll look for you again!
Regards,
DK
POS,
Hmmm, that’s the way I started, too! For me, it was interest in PHP and Kevin Yank’s book got me to setup a test server for me to fool around with on my WinDoze box (I WON’T use a host with a WinDoze box, though) and I now consider myself quite accomplished across the board (including jQuery, CSS, and especially PHP).
Oh, yeah, wandering around what I was getting at: We DON’T bite and the only question which is stupid is the one you don’t know the answer to but are afraid to ask. Fire away and take the time to learn! You’ll be surprised at the caliber of volunteers on the SitePoint staff who are all willing to help!
Regards,
DK
No offense at all, sir. I am thankful that you took the time to respond, and that you additionally bothered to tell me something I might not have known. I am definitely inexperienced, but I always try to take the time to figure out what I am doing and why, and hopefully do it safely. I’d much rather have someone assume I knew too little than have them not tell me something important for fear of offending me. I wouldn’t be surprised if I break a thing or two on my new account, but I am just messing around right now, and still maintain all of my clients’ sites on a different server.
I’m glad I have finally started posting here after looking for a long time, and will definitely be around. I’ve only just got a bit of a handle on CSS, and will be trying to learn PHP/MySQL in the coming months, and I guess that will have me coming back to the Apache forum now and then.
Thanks a lot, DK, I got it working. I had actually tried that before, but while I was screwing around, I left a stray .htaccess in one folder, and that was the folder I happened to go to for testing, so it threw me off.
Yes, this is cool. A lot like CSS, so I understand the concept.
Right, I understand this, I was just using ftp_user x to populate my example. I do know how to set password protection (I have just been doing it through cPanel), but I was trying to work out the details of index browsing and specificity independently. I’m glad it works like I expected it to. After your post I just decided to start from scratch and try it again…that’s when I found the other file I thought I had deleted.
Well, I guess that explains why they don’t give me access.
I briefly tried a VPS, where I had access to everything, but I decided I probably wasn’t ready for that, and downgraded to a reseller account on a shared server. I think this will be a reasonable way for me to explore this stuff as a n00b, and come back to the VPS when I have gained more knowledge and confidence.
Thank you again for your replies!
Bahah! I never realized that my name could be shortened to “POS.” That’s awesome.
Thanks for your reply. I’m pretty much a n00b, didn’t really even know what .htaccess was before today. It’s possible that what I’m trying to do doesn’t make sense, and/or that it’s not possible.
I want to set up multiple ftp accounts, with different folders which are all in the same folder, like:
-public_html
-----ftp_folder
----------ftp_user1
----------ftp_user2
----------ftp_user3
etc.
I want directory browsing to be off by default, and off for the ftp_folder, so when a user is logged in they can’t see other users’ folders. But I’d like to be able to enable browsing on a per folder basis.
Quite possible that I am going about this the wrong way, but I still don’t quite get why it won’t work. I don’t think I have access to httpd.conf (not that I’d know what to do with it if I did.
POS,
First, WELCOME to SitePoint’s Apache forum!
Now, WHAT is it you’re trying to do. Both your directives look “weird” to me but …
Regards,
DK
POS,
Okay, it makes sense ONLY if you’re not “jailing” your FTP directories away from the webspace (NOT a subdirectory of public_html).
.htaccess in DocumentRoot (public_html):
Options -Indexes
.htaccess is heirarchical so you don’t need anything different in ftp_folder. In the ftp_userx folders, use
Options +Indexes
That’s all there is to it (for suppressing directory index listings).
See what “specificity” can do for you?
BTW, please DON’T use ftp_userx as that’s too easy to guess that there are others and it looks like you don’t know how to setup password protection for those directories.
Be glad that you don’t have access to httpd.conf - a noob CAN bring down an entire server and that’s a BAD thing for a shared hosting account!
Regards,
DK