I have an images folder at the following URL.
www.mysite.com/uploads/
On a different page:
www.mysite.com/search.php/
I am trying to access the images wherein, with a correct tag link, however I get the :
Forbidden
You don't have permission to access /uploads/ on this server.
So I went and started dabbling with a .htaccess
file, and I have no idea what I am doing ,I tried looking at some documentation but with no luck, I even took an example off another question..Here is how my .htaccess
file looks atm:
<FilesMatch "\.(gif|jpe?g|png)$">
Order allow,deny
Allow from all
</FilesMatch>
<Directory /uploads>
# All access controls and authentication are disabled
# in this directory
Satisfy Any
Allow from all
</Directory>
Any ideas on how I can have it allow access to that folder?
<Directory /uploads>
Options +Indexes
</Directory>
Give permission in .htaccess as follows:
<Directory "Your directory path/uploads/">
Allow from all
</Directory>
Create a .htaccess file in the images folder and add this
<IfModule mod_rewrite.c>
RewriteEngine On
# directory browsing
Options All +Indexes
</IfModule>
you can put this Options All -Indexes
in the project file .htaccess
,file to deny direct access to other folders.
This does what you want
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With