php - Safety pictures at server -


I am trying to upload my pictures to users on my website and I do not want them to see others, here Even if they know their URL I would like to apply something like Apache without any unusual folder (if it is possible with .htacess) I do not want to put them in the database because this server is very slow (IMO) Is there a solution? I saw something on FB, but its quite a different league.

You can disable public access in a directory by using the public directory .htaccess

  RewriteEngine On RewriteRule ^ (?: Images) \ b * Index.php / $ 0 [L]   

This will request in the image folder in your index.php file.

This will only work if you have mod_rewrite enabled.

Also you can add a .htaccess file to that folder that you want to disable public access and add the following rule.

  Deny all    

Comments

Popular posts from this blog

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

sql - PostgreSQL automatically update row at specific date -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -