Hi, I have a folder on my server which i want to protect. I though everything is setup fine and does protect the folder but also protects the public_html also even though the htaccess file is in a sub folder. AuthName "Restricted Area" AuthType Basic AuthUserFile /vhost/vhost6/s/d/o/.htpasswd AuthGroupFile /dev/null require valid-user Code (markup): Any ideas? Cheers, Adam
Look in the <Directory> section of your httpd.conf file for apache and make sure it is properly configured.
There is no .htaccess file in the public_html folder and i cannot look at the httpd.conf file either because i don't have access to this. Any other ideas?
Then maybe you are on a shared host which doesn't allow protection of subfolders. If you don't have access to editing the httpd.conf file there's not much you can do.
Right i think i have found the problem, basically within the folder i am protecting i have a folder with images which i am accessing to display images on the main site. I think because it is protecting the folder and it's sub folders that is where the problem lies. Is it possible to add another .htaccess to the images folder to reverse the rule on that sub folder?
Thank you for that link, it seems a bit complex and also there is no working solution on there. Has anyone got a working solution which i can implement?
Simplier solution is to not embed public folders into protected ones, i.e. refactor your folders structure.