title: allow image access only from specific html page
body: <p>I've got different users for my website, owning different images which are all stored in the same folder. The images are stored in an incremental fashion, 1.jpg, 2.jpg etc.
  User can view these pictures on a specific php page. Now I want to restrict the access to these images only through this php page so that they can't simply enumerate all the filenames to see the images of other users.</p>
  
  <p>I thought of doing this with an <code>.htaccess</code> file which is stored besides the images in <code>/shop/img/userimg/</code> and would look something like this:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/shop/shop.php [NC]
  RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
  </code></pre>
  
  <p>My site is a subsite (as you can see: /shop/) and the php page to view these images would be <code>shop.php</code>.</p>
  
  <p>Now, is this possible at all? What am I doing wrong?</p>