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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -