directory access !

Well i have some photos in one folder that i want prevent from unauthorized access
Moreover anyone can type in URL like that “website.name/photo” and get access to my directory
So what should i write in .htaccess to to prevent directory access but “IT SHOULD ACCESS BY HTML AND PHP FILE”
pleases help !

@swalla said:
Well i have some photos in one folder that i want prevent from unauthorized access
Moreover anyone can type in URL like that “website.name/photo” and get access to my directory
So what should i write in .htaccess to to prevent directory access but “IT SHOULD ACCESS BY HTML AND PHP FILE”
pleases help !

Use the Directory Privacy option in your control panel and set up a password for it.

@swalla said:
So what should i write in .htaccess

if you do not want the content of DIR to be listed (plus to return 403 forbidden)
put this in .htaccess file

# Disable Directory Listings in this Directory and Subdirectories
# This will hide the files from the public
Options -Indexes

@ChrisPAR
Thank you :slight_smile:

@OxyDac
Thank You :slight_smile: