I’ve set up a folder with a user name and password. I was hoping to be able to see a list of the files and folders once logged in but I’m getting redirected with a 404 error unless I type an exact path to a particular file. Is that because of a .htaccess file? How can I make sure I can see the files and folders once I have logged in? Thanks
Your post isn’t very clear.
How did you set a pass? Using the htacess/WebDAV panel section, or some other method? If you used the panel tool, did you leave the WebDAV box unchecked?
What’s in your htacess file? Or what happens if you rename it temporally to test behavior without it?
Thanks for the reply. I used the panel section to set the password. I left the WebDAV box unchecked. I did rename the htaccess file but didn’t see any change.
So what do you get when you go to the url of the folder? A 404 error page? not an Apache “Index of” page that is generated when no index file exists? Is the Apache index page what you are expecting?
Yes, I’m seeing a 404 error page. I guess it is the Apache index page I’m expecting. I thought I would see a list of folders and files.
I presume the .htaccess that exists is what the panel created for you, which shouldn’t contain
however it’s also possible that “-Indexes” is being inherited from a directory above (and that .htaccess might have been installed for you by a CMS such as wordpress).
If that’s the case, you probably want to leave the “-Indexes” in force for the directory above and instead edit the .htaccess that was created to add the user/pass and add a new line to the file:
Which will reverse the “Options -Indexes” that is being inherited from above.
This is just a guess, I don’t have any idea the structure of your domain, but normally by default you should see the auto generated Apache index.
Thanks, the .htaccess in my root folder doesn’t contain ‘Options -Indexes’. I don’ see a .htaccess inside the folder I set a user and password for. I’m using Dreamweaver. I tried to upload a .htaccess file from my home computer to the folder but got an access denied error. I guess I’m confused about how it is supposed to work. It’s been years since I looked at .htaccess files. I think I should be able to use Dreamweaver to upload files to the folder and that when logged in I should be able to see a list of files and folders but it iis definitely not working that way. Perhaps I need to delete the folder from the htaccess/webDEV panel and start again?
Are you trying to see this list within dreamweaver or by navigating to the folders url in a browser? i.e. Http://domain.com/folder (Without any mention of dreamweaver until now, I had not had that thought.)
As far as I know dreamweaver won’t handle invisible or dot files correctly. To upload something like .htaccess you would need to upload it as htaccess then rename it to pre-pend the .
I was using Dreamweaver to upload files and a browser to try and view the directory, but I’ve figured it out. I switched to using FileZilla and have now sorted out the .htaccess in the folder so it is behaving as expected. Thanks very much for your patience and help. Your questions helped me to understand what was going on and what I needed to do. Cheers!
on godaddy hosting i am not able to find .htaccess but in my dreamhost i can get that.