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

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -