- otoworkz
- upload
- images
- sound
- upload
Let say we have a directory structure like above, and we want to block any direct access to the upload folder the child folder (images, sound). So how? follow these instruction:
- Create .htaccess file with the following content:
Options -Indexes
- Put it under upload folder.
- Change file permission to 755:
sudo chmod 755 .htaccess
- Restart the Apache and done!
* if still not work, try to enable mod_rewrite module on Apache httpd.conf file.
No comments:
Post a Comment