I have a system where users upload image files. I only want specific users to have access to these files and not for anyone to just go to example.php/image.jpg and see any user’s image…Thanks
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can add the following to an .htaccess file, and drop the file into the directory where your images are stored :
To prevent directory browsing:
To prevent image hotlinking:
Replace mydomain.com with your own domain name.