Unable to redirect just in case of a direct access to an image using .htaccess
I am new to .htaccess file and I have this problem:
I want to redirect to a php script only if the user tries to access directly the url of an image like “http://website.com/images/userX/imageY.png” (because I want to check if he has permissions with session variable).