Page 1 of 1

.htaccess coding to restrict direct folder access???

Posted: 04 Dec 2008, 13:58
by markam24
I notice some IV users sites restrict direct access to content folders via direct URLs.

As an example.
- go to "www.(mysitename).com/content" and all the content files and folders are visible via the browser.

Some IV users sites, however, will show a "Forbidden" or 403 error if you do the same thing.

Is this done by including a code within the .htaccess to prevent directly opening certain folders?

The closest thing I've found on the subject through my hosts help desk is this: http://helpdesk.bluehost.com/kb/index.p ... d=2&id=567

By including this script within the .htaccess file I AM able to restrict access to my content folder, but then some thumbnails no longer display in the galleries...

Can anyone offer advice on how you are restricting access without effecting the gallery behavior?

Thanks in Advance -;)

Posted: 05 Dec 2008, 07:45
by Nick
This is an issue on your server, groups/permissions are set incorrectly, looks like Apache (web server) can't read files/dirs created by php (web server child process). This is incorrect, but can be solved only by server admin.

You have to adress an issue there and ask em to resolve the issue.

Posted: 05 Dec 2008, 12:55
by markam24
Got it. Spoke with BlueHost and cleared it up. Just needed to add the code "Options -Indexes" to the .htaccess file and indexes are no longer visible.

As Always...Thank You -:)