.htaccess Block direct access to subdirectories, but allow them to be called via JQuery/images/etc
===

My main index.php calls a couple of scripts via JQuery from a subdirectory. I need to block direct access to any files in this directory, but allow them to be accessed by index.php. I have tried the simply:

`deny from all`

approach, but this blocks even Jquery from loading the script. There is also an `/images` subdirectory that needs to be blocked from direct access. `deny all` disallows the image from being called in any way. Does anyone know how to do this?